nit
This commit is contained in:
+6
-6
@@ -4,12 +4,12 @@ import "core:fmt"
|
||||
import "core:math/rand"
|
||||
|
||||
COLORS :: enum u8 {
|
||||
RED = 0b000,
|
||||
GREEN = 0b001,
|
||||
WHITE = 0b010,
|
||||
BLUE = 0b011,
|
||||
YELLOW = 0b100,
|
||||
RAINBOW = 0b101,
|
||||
RED,
|
||||
GREEN,
|
||||
WHITE,
|
||||
BLUE,
|
||||
YELLOW,
|
||||
RAINBOW,
|
||||
}
|
||||
|
||||
Card :: bit_field u8 {
|
||||
|
||||
+4
-4
@@ -18,9 +18,9 @@ COMMAND can be one of the following, with args and FLAGS specified under:
|
||||
--lives (-l) // number of lives (default=3). try 1 for instant death difficulty!
|
||||
|
||||
example:
|
||||
host $ hanabi host 127.0.0.1:42069 2 --lives 1
|
||||
player 1 $ hanabi connect 127.0.0.1:42069
|
||||
player 2 $ hanabi connect 127.0.0.1:42069`
|
||||
host $ hanabi host localhost:42069 2 --lives 1 -H 20
|
||||
player 1 $ hanabi connect localhost:42069
|
||||
player 2 $ hanabi c localhost:42069`
|
||||
|
||||
|
||||
Host_Args :: struct {
|
||||
@@ -77,7 +77,7 @@ main :: proc() {
|
||||
h: Host_Args
|
||||
h.hints = 8
|
||||
h.lives = 3
|
||||
flags.parse(&h, args[2:], .Unix, strict = true)
|
||||
flags.parse(&h, args[2:], .Unix)
|
||||
endpoint := resolve_endpoint(h.addr)
|
||||
run_server(endpoint, h.players, h.hints, h.lives)
|
||||
case:
|
||||
|
||||
+3
-3
@@ -64,9 +64,9 @@ run_server :: proc(listen_addr: net.Endpoint, num_players: int, num_hints: int,
|
||||
defer net.close(listener)
|
||||
|
||||
fmt.println("creating game instance...")
|
||||
fmt.println("number of players:", num_players)
|
||||
fmt.println("number of hints:", num_hints)
|
||||
fmt.println("number of lives:", num_lives)
|
||||
fmt.println("\tnumber of players:", num_players)
|
||||
fmt.println("\tnumber of hints:", num_hints)
|
||||
fmt.println("\tnumber of lives:", num_lives)
|
||||
g := create_game(num_hints, num_lives, num_players)
|
||||
defer delete_game(&g)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user