diff --git a/src/game.odin b/src/game.odin index f1ce3e5..e26a903 100644 --- a/src/game.odin +++ b/src/game.odin @@ -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 { diff --git a/src/main.odin b/src/main.odin index 5a0626c..9072231 100644 --- a/src/main.odin +++ b/src/main.odin @@ -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: diff --git a/src/server.odin b/src/server.odin index a455073..53dd50b 100644 --- a/src/server.odin +++ b/src/server.odin @@ -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)