Game

> cq game --help
Operations on Games

Usage: cq game <COMMAND>

Commands:
  show         Show Game
  new          New Game
  list         List games
  join         Join game
  change       Change a game (GAME ADMIN only)
  cancel       Cancel (participation in) a game
  message      Operation on game messages
  move         Move your pawn
  jump         Jump your pawn over another pawn
  place        Place a wall
  mark         Mark an edge
  unmark       Unmark an edge
  offer        Offer a wall
  trade        Trade a wall offer
  leaderboard  Show Leaderboard

show

> cq game show --help 
Show Game

Usage: cq game show --game-id <GAME_ID>

Options:
  -g, --game-id <GAME_ID>  The ID of the game to show

This command will most likely be the most used command of all. The reason is simple: it gives you a full rendering of the current situation in the game. Here is an example of an active 4 player game:

[TBC]

new

> cq game new --help
New Game

Usage: cq game new [OPTIONS]

Options:
      --invite [<USER_NAME>]
          Specify one or more times with a user name to send an invitation code to those users
  -p, --private
          Make this game private. Only players will see it, not others
  -n, --number-of-players <NUMBER_OF_PLAYERS>
          Number of players (2 or 4) [default: 2]
  -b, --board-size <BOARD_SIZE>
          Board size (5 to 17 uneven) [default: 9]
  -m, --masked-walls
          Players can not see who has placed walls and how many are left
  -x, --invisible-walls
          Placed walls are invisible

With this command a user can create a new game. As can be seen from the help output above you can specify the game variant, the visability and invite other users to this game. If you specify '--invite' the invitation code will be returned. If you specify usernames the system will send these users an email with the invitation code. This is optional, you can choose to send the invitation code to other users through any other menas.

list

> cq game list --help   
List games

Usage: cq game list [OPTIONS]

Options:
  -s, --status <STATUS>  filter on game status [possible values: waiting, active, finished, canceled]
  -u, --user <USER>      filter on user, use 'me' for filtering on yourself
  -g, --game <GAME>      filter on player relation [possible values: admin, player, won, current]

With the list command you can get a listing of games. You can filter on game status and/or a user and the relation of that user as a player in these games. For example: 'cq game list -u me -g won' gives back all games that you have won.

 > cq game list               

Game ID Status    Players  Size Private? Masked? Invisible? Won By     Players                                 
      4 Active       2     5X5    No       No       No        ?        alice, >bob                                      
      3 Active       4     9X9    No       No       No        ?        bob, >alice, carol, dave                        
      2 Finished     2    13X13   No       No       No      dave       carol, dave                                      
      1 Finished     2     5X5    No       No       No      carol      carol, bob                                      

> is current player

The list gives back the status, game variant, who has won the game (if _finished) and the players in the game.

Note: As long as the game has status Waiting the game admin (the first layer of the game that has also created the game) can change most of this using the change command.

join

> cq game join --help
Join game

Usage: cq game join [OPTIONS] --game-id <GAME_ID>

Options:
  -g, --game-id <GAME_ID>                  The ID of the game to join
  -i, --invitation-code <INVITATION_CODE>  The invitation code of an invite-only game to join

With the join command you can join an existing game that is still in the Waiting state. If it is an invite only game wou also need to provide the received invitation code.

change

> cq game change --help
Change a game (GAME ADMIN only)

Usage: cq game change [OPTIONS] --game-id <GAME_ID>

Options:
  -g, --game-id <GAME_ID>
          The ID of the game to change
  -n, --number-of-players <NUMBER_OF_PLAYERS>
          Change Number of Players (2 or 4)
  -b, --board-size <BOARD_SIZE>
          Change Board Size (5 to 17 uneven)
  -m, --masked-walls
          Toggle Masked Walls setting
  -x, --invisible-walls
          Toggle Invisible Walls setting
  -p, --private
          Toggle Private setting
      --invite [<USER_NAME>]
          Specify one or more times with a user name to send an invitation code to those users

The game admin can change the above aspects of a Waiting game. The mandatory '--game-id' option specifies the game to change. If there are more than two players waiting in a 4 player game and the change is to a 2 player game, this is refused. If exactly 2 players are waiting, the game is started.

cancel

> cq game cancel --help
Cancel (participation in) a game

Usage: cq game cancel --game-id <GAME_ID>

Options:
  -g, --game-id <GAME_ID>  The ID of the game to cancel

If the game is Waiting and you are not the game admin, you are simply removed as a player. If the game is Active or you are the game admin, the game is Cancelled. This means playing is no longer possible and the game will be removed from the system during automatic regular and periodic system maintenance.

message

> cq game message --help
Operation on game messages

Usage: cq game message <COMMAND>

Commands:
  send  Send a message to a game
  list  List messages of a game
  mute  Set the mute state for a player in a game

move

> cq game move --help

You can use 3 methods to specify the move:
1. algebraic notation. For example: 'e4' means column e, row 4
2. compass notation ('north', 'south', 'west', 'east')
3. directional notation ('up', 'down', 'left', 'right')

Usage: cq game move --game-id <GAME_ID> <TO>

Arguments:
  <TO>
          The position to move to

Options:
  -g, --game-id <GAME_ID>
          The ID of the game to move the pawn

One of the actions you can do when it is your turn in the game is 'move' your pawn according to the game rules. As you can see from the command's help output above there is 3 ways to specify a move. Most people will most likely use the relative directional options (compass and directional), as they are the most intuitive. The absolute chess based notation is mostly used by automatic interfaces.

jump

> cq game jump --help

You can use several methods to specify the jump:
1. algebraic notation. For example: 'e4' means column e, row 4
2. compass notation ('north', 'south', 'west', 'east')
3. compass diagonal notation ('north-west', 'north,east', 'southwest', 'east-south', etc)
4. directional notation ('up', 'down', 'left', 'right')
5. directional diagonal notation ('up-left', 'up,right', 'down-left', 'downright', etc)

Usage: cq game jump --game-id <GAME_ID> <TO>

Arguments:
  <TO>
          The position to move to

Options:
  -g, --game-id <GAME_ID>
          The ID of the game to move the pawn

Like with move there are several ways to specify the location to move to and they are explained above in the command help output. There are specific game rules for jumping.

place

> cq game place --help

General:
You need to use algebraic notation for the placement.
For example: 'e4v' means column e, row 4, orientation vertical
You always use the top-left most coordinate, for example:
e4v means a wall vertically placed between columns e and f spanning rows 4 to 5
'c3h' means a wall horizonally placed between rows 3 and 4 spanning columns c to d

Usage: cq game place --game-id <GAME_ID> <ON>

Arguments:
  <ON>
          The top-left coordinate to place the wall (example: e4v)

Options:
  -g, --game-id <GAME_ID>
          The ID of the game to move the pawn

For wall placement only the extended chess notation can be used. There are specific placement rules for walls.

mark

> cq game mark --help
General:
You need to use algebraic notation for marking an edge.
For example: e4v means column e, row 4, orientation vertical
You always use the top-left most coordinate, for example:
e4v means a wall vertically placed between columns e and f
c3h means a wall horizonally placed between rows 3 and 4

Usage: cq game mark --game-id <GAME_ID> <COORDINATE>

Arguments:
  <COORDINATE>
          The top-left coordinate to mark an edge (example: e4v)

Options:
  -g, --game-id <GAME_ID>
          The ID of the game to mark an edge

This command is only available if the game is active and has Invisible Walls enabled. This means opponents walls are not visible on the game-board. To help you to keep track of where you think their walls are, you can mark edges. A mark is only one square in length as opposed to walls, which are 2 squares in length. Whenever you show the game you will see only your walls and your marks. You can mark edges whenever you like: you do not have to wait until it is your turn. You can also mark as many edges as you like. You cannot place a mark on on of your own walls. Also, when you place a wall where marks are, those marks will be removed. See marks as a personal notepad. When the game is Finished, invisability mode is disabled and you see all walls again, color coded by player and with you marks as an overlay, so you can see which marks you had right and which not.

unmark

> cq game unmark --help
General:
You need to use algebraic notation for unmarking an edge.
For example: e4v means column e, row 4, orientation vertical
You always use the top-left most coordinate, for example:
e4v means a wall vertically placed between columns e and f
c3h means a wall horizonally placed between rows 3 and 4

Usage: cq game unmark --game-id <GAME_ID> <COORDINATE>

Arguments:
  <COORDINATE>
          The top-left coordinate to mark an edge (example: e4v)

Options:
  -g, --game-id <GAME_ID>
          The ID of the game to unmark an edge

This is the opposite of mark. You can remove previously made marks. Here too, you can do this any time.

offer

> cq game offer --help
Offer a wall

Usage: cq game offer --game-id <GAME_ID> <TRADING_MODE> [TRADING_PARTNER]

Arguments:
  <TRADING_MODE>     Trading mode (Selling or Buying) [possible values: buying, selling]
  [TRADING_PARTNER]  Trading partner

Options:
  -g, --game-id <GAME_ID>  The ID of the game to offer a wall

This command is part of the wall trading functionality. You can either offer to buy or offer to sell. You can only sell if you have walls availabile to sell. This will create an in-game broadcast message

You can optionally specify an opponent in the game as a trading partner. This will make the offer private and the offering message is only visible for the trading partner. This is known as a Direct Message (DM).

trade

> cq game trade --help 
Trade a wall offer

Usage: cq game trade --game-id <GAME_ID> <TRADING_MODE> <TRADING_PARTNER>

Arguments:
  <TRADING_MODE>     Trading mode (Selling or Buying) [possible values: buying, selling]
  <TRADING_PARTNER>  Trading partner

Options:
  -g, --game-id <GAME_ID>  The ID of the game to trade a wall offer

This command is part of the wall trading functionality. If an opponent has made an offer to either buy of sell, you can make the trade. If the offer is to buy and you want to trade, you need to have a wall available to sell it.

If the offer has been made in private to you, you need to specify the trading partner being the offering opponent.

Making a trade has a cost that will be incorporated in the final score when the game is finished. The specific cost depends on the game variant. The show command for the game disaplays the wall cost.

leaderboard

> cq game leaderboard --help
General:
Leaderboards are per unique combination of board size,
number of players, masked walls and invisible walls.
This is because scores must be comparable for a leaderboard

Usage: cq game leaderboard [OPTIONS]

Options:
  -b, --board-size <BOARD_SIZE>
          Board size (5 to 17 uneven)
          
          [default: 9]

  -n, --number-of-players <NUMBER_OF_PLAYERS>
          Number of players (2 or 4)
          
          [default: 2]

  -m, --masked-walls
          Masked walls

  -i, --invisible-walls
          Invisible walls

This command show the max 10 users with the heighest scores in a Game Variant. The options are to specify the game variant with a default for each one.