Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Placing ships #41

Open
simonrenger opened this issue Apr 10, 2018 · 2 comments
Open

[Bug] Placing ships #41

simonrenger opened this issue Apr 10, 2018 · 2 comments

Comments

@simonrenger
Copy link
Contributor

simonrenger commented Apr 10, 2018

I am not sure if this is a bug or if this is what you want. I made the server print out the placements of the ships.

The placements: (based on the server out put)
player 1

Ship type x y
0 1 19
1 2 19
2 3 19
3 4 19
4 5 19

player 2:

Ship type x y
0 3 6
1 7 9
2 6 6
3 9 6
4 1 2

[2018-04-10 16:40:21] RakNet started.
[2018-04-10 16:40:21] Server socket [60000] open for receive.
[2018-04-10 16:47:42] New incoming connection.
[2018-04-10 16:47:42] Client [170636] attempt to login with pass [232246529].
[2018-04-10 16:47:42] Successful login for client [170636] with pass [232246529].
[2018-04-10 16:47:42] Client [Simon Renger / 3781878816] added to waiting queue for game lobby [BATTLESHIPS].
[2018-04-10 16:48:57] New incoming connection.
[2018-04-10 16:48:57] Client [160664] attempt to login with pass [232246529].
[2018-04-10 16:48:57] Successful login for client [160664] with pass [232246529].
[2018-04-10 16:48:57] Client [Maiko Steeman / 850389694] added to waiting queue for game lobby [BATTLESHIPS].
[2018-04-10 16:48:57] New game [BATTLESHIPS / 3881161174] starting for client [Simon Renger / 3781878816].
[2018-04-10 16:48:57] New game [BATTLESHIPS / 3881161174] starting for client [Maiko Steeman / 850389694].
    -----------------------------------------
                    Player two
    -----------------------------------------
      0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
    -----------------------------------------
  0 |   |   |   |   |   |   |   |   |   |   | 19
    -----------------------------------------
  1 |   | A |   |   |   |   |   |   |   |   | 18
    -----------------------------------------
  2 |   | A |   |   |   |   |   |   |   |   | 17
    -----------------------------------------
  3 |   |   |   |   |   |   |   |   |   |   | 16
    -----------------------------------------
  4 |   |   |   |   |   |   |   |   |   |   | 15
    -----------------------------------------
  5 |   |   |   |   |   |   |   |   |   |   | 14
    -----------------------------------------
  6 |   |   |   |   |   |   |   |   |   |   | 13
    -----------------------------------------
  7 |   |   |   |   |   |   |   |   |   |   | 12
    -----------------------------------------
  8 |   |   |   |   |   |   |   |   |   |   | 11
    -----------------------------------------
  9 |   |   |   |   |   |   |   |   |   |   | 10
    -----------------------------------------
 10 |   |   |   |   |   |   |   |   |   |   | 9
    -----------------------------------------
 11 |   |   |   |   |   |   |   |   |   |   | 8
    -----------------------------------------
 12 |   |   |   |   |   |   |   |   |   |   | 7
    -----------------------------------------
 13 |   |   |   |   |   |   |   |   |   |   | 6
    -----------------------------------------
 14 |   |   |   |   |   |   |   |   |   |   | 5
    -----------------------------------------
 15 |   |   |   |   |   |   |   |   |   |   | 4
    -----------------------------------------
 16 |   |   |   |   |   |   |   |   |   |   | 3
    -----------------------------------------
 17 |   |   |   |   |   |   |   |   |   |   | 2
    -----------------------------------------
 18 |   |   |   |   |   |   |   |   |   |   | 1
    -----------------------------------------
 19 |   |   |   |   |   |   |   |   |   |   | 0
    -----------------------------------------
      9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0
    -----------------------------------------
                    Player one
    -----------------------------------------
Ship Placed4 1 2
    -----------------------------------------
                    Player two
    -----------------------------------------
      0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
    -----------------------------------------
  0 |   |   |   |   |   |   |   |   |   |   | 19
    -----------------------------------------
  1 |   | A |   |   |   |   |   |   |   |   | 18
    -----------------------------------------
  2 |   | A |   |   |   |   |   |   |   |   | 17
    -----------------------------------------
  3 |   |   |   |   |   |   |   |   |   |   | 16
    -----------------------------------------
  4 |   |   |   |   |   |   | B |   |   |   | 15
    -----------------------------------------
  5 |   |   |   |   |   |   | B |   |   |   | 14
    -----------------------------------------
  6 |   |   |   |   |   |   | B |   |   |   | 13
    -----------------------------------------
  7 |   |   |   |   |   |   |   |   |   |   | 12
    -----------------------------------------
  8 |   |   |   |   |   |   |   |   |   |   | 11
    -----------------------------------------
  9 |   |   |   |   |   |   |   |   |   |   | 10
    -----------------------------------------
 10 |   |   |   |   |   |   |   |   |   |   | 9
    -----------------------------------------
 11 |   |   |   |   |   |   |   |   |   |   | 8
    -----------------------------------------
 12 |   |   |   |   |   |   |   |   |   |   | 7
    -----------------------------------------
 13 |   |   |   |   |   |   |   |   |   |   | 6
    -----------------------------------------
 14 |   |   |   |   |   |   |   |   |   |   | 5
    -----------------------------------------
 15 |   |   |   |   |   |   |   |   |   |   | 4
    -----------------------------------------
 16 |   |   |   |   |   |   |   |   |   |   | 3
    -----------------------------------------
 17 |   |   |   |   |   |   |   |   |   |   | 2
    -----------------------------------------
 18 |   |   |   |   |   |   |   |   |   |   | 1
    -----------------------------------------
 19 |   |   |   |   |   |   |   |   |   |   | 0
    -----------------------------------------
      9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0
    -----------------------------------------
                    Player one
    -----------------------------------------
Ship Placed2 6 6
    -----------------------------------------
                    Player two
    -----------------------------------------
      0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
    -----------------------------------------
  0 |   |   |   |   |   |   |   |   |   |   | 19
    -----------------------------------------
  1 |   | A |   |   |   |   |   |   |   |   | 18
    -----------------------------------------
  2 |   | A |   | C |   |   |   |   |   |   | 17
    -----------------------------------------
  3 |   |   |   | C |   |   |   |   |   |   | 16
    -----------------------------------------
  4 |   |   |   | C |   |   | B |   |   |   | 15
    -----------------------------------------
  5 |   |   |   | C |   |   | B |   |   |   | 14
    -----------------------------------------
  6 |   |   |   | C |   |   | B |   |   |   | 13
    -----------------------------------------
  7 |   |   |   |   |   |   |   |   |   |   | 12
    -----------------------------------------
  8 |   |   |   |   |   |   |   |   |   |   | 11
    -----------------------------------------
  9 |   |   |   |   |   |   |   |   |   |   | 10
    -----------------------------------------
 10 |   |   |   |   |   |   |   |   |   |   | 9
    -----------------------------------------
 11 |   |   |   |   |   |   |   |   |   |   | 8
    -----------------------------------------
 12 |   |   |   |   |   |   |   |   |   |   | 7
    -----------------------------------------
 13 |   |   |   |   |   |   |   |   |   |   | 6
    -----------------------------------------
 14 |   |   |   |   |   |   |   |   |   |   | 5
    -----------------------------------------
 15 |   |   |   |   |   |   |   |   |   |   | 4
    -----------------------------------------
 16 |   |   |   |   |   |   |   |   |   |   | 3
    -----------------------------------------
 17 |   |   |   |   |   |   |   |   |   |   | 2
    -----------------------------------------
 18 |   |   |   |   |   |   |   |   |   |   | 1
    -----------------------------------------
 19 |   |   |   |   |   |   |   |   |   |   | 0
    -----------------------------------------
      9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0
    -----------------------------------------
                    Player one
    -----------------------------------------
Ship Placed0 3 6
    -----------------------------------------
                    Player two
    -----------------------------------------
      0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
    -----------------------------------------
  0 |   |   |   |   |   |   |   |   |   |   | 19
    -----------------------------------------
  1 |   | A |   |   |   |   |   |   |   |   | 18
    -----------------------------------------
  2 |   | A |   | C |   |   |   |   |   |   | 17
    -----------------------------------------
  3 |   |   |   | C |   |   |   |   |   |   | 16
    -----------------------------------------
  4 |   |   |   | C |   |   | B |   |   |   | 15
    -----------------------------------------
  5 |   |   |   | C |   |   | B |   |   |   | 14
    -----------------------------------------
  6 |   |   |   | C |   |   | B | D |   |   | 13
    -----------------------------------------
  7 |   |   |   |   |   |   |   | D |   |   | 12
    -----------------------------------------
  8 |   |   |   |   |   |   |   | D |   |   | 11
    -----------------------------------------
  9 |   |   |   |   |   |   |   | D |   |   | 10
    -----------------------------------------
 10 |   |   |   |   |   |   |   |   |   |   | 9
    -----------------------------------------
 11 |   |   |   |   |   |   |   |   |   |   | 8
    -----------------------------------------
 12 |   |   |   |   |   |   |   |   |   |   | 7
    -----------------------------------------
 13 |   |   |   |   |   |   |   |   |   |   | 6
    -----------------------------------------
 14 |   |   |   |   |   |   |   |   |   |   | 5
    -----------------------------------------
 15 |   |   |   |   |   |   |   |   |   |   | 4
    -----------------------------------------
 16 |   |   |   |   |   |   |   |   |   |   | 3
    -----------------------------------------
 17 |   |   |   |   |   |   |   |   |   |   | 2
    -----------------------------------------
 18 |   |   |   |   |   |   |   |   |   |   | 1
    -----------------------------------------
 19 |   |   |   |   |   |   |   |   |   |   | 0
    -----------------------------------------
      9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0
    -----------------------------------------
                    Player one
    -----------------------------------------
Ship Placed1 7 9
    -----------------------------------------
                    Player two
    -----------------------------------------
      0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
    -----------------------------------------
  0 |   |   |   |   |   |   |   |   |   |   | 19
    -----------------------------------------
  1 |   | A |   |   |   |   |   |   |   |   | 18
    -----------------------------------------
  2 |   | A |   | C |   |   |   |   |   |   | 17
    -----------------------------------------
  3 |   |   |   | C |   |   |   |   |   |   | 16
    -----------------------------------------
  4 |   |   |   | C |   |   | B |   |   | E | 15
    -----------------------------------------
  5 |   |   |   | C |   |   | B |   |   | E | 14
    -----------------------------------------
  6 |   |   |   | C |   |   | B | D |   | E | 13
    -----------------------------------------
  7 |   |   |   |   |   |   |   | D |   |   | 12
    -----------------------------------------
  8 |   |   |   |   |   |   |   | D |   |   | 11
    -----------------------------------------
  9 |   |   |   |   |   |   |   | D |   |   | 10
    -----------------------------------------
 10 |   |   |   |   |   |   |   |   |   |   | 9
    -----------------------------------------
 11 |   |   |   |   |   |   |   |   |   |   | 8
    -----------------------------------------
 12 |   |   |   |   |   |   |   |   |   |   | 7
    -----------------------------------------
 13 |   |   |   |   |   |   |   |   |   |   | 6
    -----------------------------------------
 14 |   |   |   |   |   |   |   |   |   |   | 5
    -----------------------------------------
 15 |   |   |   |   |   |   |   |   |   |   | 4
    -----------------------------------------
 16 |   |   |   |   |   |   |   |   |   |   | 3
    -----------------------------------------
 17 |   |   |   |   |   |   |   |   |   |   | 2
    -----------------------------------------
 18 |   |   |   |   |   |   |   |   |   |   | 1
    -----------------------------------------
 19 |   |   |   |   |   |   |   |   |   |   | 0
    -----------------------------------------
      9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0
    -----------------------------------------
                    Player one
    -----------------------------------------
Ship Placed3 9 6
    -----------------------------------------
                    Player one
    -----------------------------------------
      0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
    -----------------------------------------
  0 |   |   |   |   |   |   |   |   |   |   | 19
    -----------------------------------------
  1 |   |   |   |   |   |   |   |   |   |   | 18
    -----------------------------------------
  2 |   |   |   |   |   |   |   |   |   |   | 17
    -----------------------------------------
  3 |   |   |   |   |   |   |   |   |   |   | 16
    -----------------------------------------
  4 |   |   |   |   |   |   |   |   |   |   | 15
    -----------------------------------------
  5 |   |   |   |   |   |   |   |   |   |   | 14
    -----------------------------------------
  6 |   |   |   |   |   |   |   |   |   |   | 13
    -----------------------------------------
  7 |   |   |   |   |   |   |   |   |   |   | 12
    -----------------------------------------
  8 |   |   |   |   |   |   |   |   |   |   | 11
    -----------------------------------------
  9 |   |   |   |   |   |   |   |   |   |   | 10
    -----------------------------------------
 10 |   |   | D |   |   |   |   |   |   |   | 9
    -----------------------------------------
 11 |   |   | D |   |   |   |   |   |   |   | 8
    -----------------------------------------
 12 |   |   | D |   |   |   |   |   |   |   | 7
    -----------------------------------------
 13 | E |   | D | B |   |   | C |   |   |   | 6
    -----------------------------------------
 14 | E |   |   | B |   |   | C |   |   |   | 5
    -----------------------------------------
 15 | E |   |   | B |   |   | C |   |   |   | 4
    -----------------------------------------
 16 |   |   |   |   |   |   | C |   |   |   | 3
    -----------------------------------------
 17 |   |   |   |   |   |   | C |   | A |   | 2
    -----------------------------------------
 18 |   |   |   |   |   |   |   |   | A |   | 1
    -----------------------------------------
 19 |   |   |   |   |   |   |   |   |   |   | 0
    -----------------------------------------
      9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0
    -----------------------------------------
                    Player two
    -----------------------------------------
    -----------------------------------------
                    Player one
    -----------------------------------------
      0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
    -----------------------------------------
  0 |   |   |   |   |   |   |   |   |   |   | 19
    -----------------------------------------
  1 |   |   |   |   |   |   |   |   |   |   | 18
    -----------------------------------------
  2 |   |   |   |   |   |   |   |   |   |   | 17
    -----------------------------------------
  3 |   |   |   |   |   |   |   |   |   |   | 16
    -----------------------------------------
  4 |   |   |   |   |   |   |   |   |   |   | 15
    -----------------------------------------
  5 |   |   |   |   |   |   |   |   |   |   | 14
    -----------------------------------------
  6 |   |   |   |   |   |   |   |   |   |   | 13
    -----------------------------------------
  7 |   |   |   |   |   |   |   |   |   |   | 12
    -----------------------------------------
  8 |   |   |   |   |   |   |   |   |   |   | 11
    -----------------------------------------
  9 |   |   |   |   |   |   |   |   |   |   | 10
    -----------------------------------------
 10 |   |   | D |   |   |   |   |   |   |   | 9
    -----------------------------------------
 11 |   |   | D |   |   |   |   |   |   |   | 8
    -----------------------------------------
 12 |   |   | D |   |   |   |   |   |   |   | 7
    -----------------------------------------
 13 | E |   | D | B |   |   | C |   |   |   | 6
    -----------------------------------------
 14 | E |   |   | B |   |   | C |   |   |   | 5
    -----------------------------------------
 15 | E | F |   | B |   |   | C |   |   |   | 4
    -----------------------------------------
 16 |   | F |   |   |   |   | C |   |   |   | 3
    -----------------------------------------
 17 |   | F |   |   |   |   | C |   | A |   | 2
    -----------------------------------------
 18 |   | F |   |   |   |   |   |   | A |   | 1
    -----------------------------------------
 19 |   | F |   |   |   |   |   |   |   |   | 0
    -----------------------------------------
      9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0
    -----------------------------------------
                    Player two
    -----------------------------------------
Ship Placed0 1 19
    -----------------------------------------
                    Player one
    -----------------------------------------
      0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
    -----------------------------------------
  0 |   |   |   |   |   |   |   |   |   |   | 19
    -----------------------------------------
  1 |   |   |   |   |   |   |   |   |   |   | 18
    -----------------------------------------
  2 |   |   |   |   |   |   |   |   |   |   | 17
    -----------------------------------------
  3 |   |   |   |   |   |   |   |   |   |   | 16
    -----------------------------------------
  4 |   |   |   |   |   |   |   |   |   |   | 15
    -----------------------------------------
  5 |   |   |   |   |   |   |   |   |   |   | 14
    -----------------------------------------
  6 |   |   |   |   |   |   |   |   |   |   | 13
    -----------------------------------------
  7 |   |   |   |   |   |   |   |   |   |   | 12
    -----------------------------------------
  8 |   |   |   |   |   |   |   |   |   |   | 11
    -----------------------------------------
  9 |   |   |   |   |   |   |   |   |   |   | 10
    -----------------------------------------
 10 |   |   | D |   |   |   |   |   |   |   | 9
    -----------------------------------------
 11 |   |   | D |   |   |   |   |   |   |   | 8
    -----------------------------------------
 12 |   |   | D |   |   |   |   |   |   |   | 7
    -----------------------------------------
 13 | E |   | D | B |   |   | C |   |   |   | 6
    -----------------------------------------
 14 | E |   |   | B |   |   | C |   |   |   | 5
    -----------------------------------------
 15 | E | F |   | B |   |   | C |   |   |   | 4
    -----------------------------------------
 16 |   | F | G |   |   |   | C |   |   |   | 3
    -----------------------------------------
 17 |   | F | G |   |   |   | C |   | A |   | 2
    -----------------------------------------
 18 |   | F | G |   |   |   |   |   | A |   | 1
    -----------------------------------------
 19 |   | F | G |   |   |   |   |   |   |   | 0
    -----------------------------------------
      9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0
    -----------------------------------------
                    Player two
    -----------------------------------------
Ship Placed1 2 19
    -----------------------------------------
                    Player one
    -----------------------------------------
      0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
    -----------------------------------------
  0 |   |   |   |   |   |   |   |   |   |   | 19
    -----------------------------------------
  1 |   |   |   |   |   |   |   |   |   |   | 18
    -----------------------------------------
  2 |   |   |   |   |   |   |   |   |   |   | 17
    -----------------------------------------
  3 |   |   |   |   |   |   |   |   |   |   | 16
    -----------------------------------------
  4 |   |   |   |   |   |   |   |   |   |   | 15
    -----------------------------------------
  5 |   |   |   |   |   |   |   |   |   |   | 14
    -----------------------------------------
  6 |   |   |   |   |   |   |   |   |   |   | 13
    -----------------------------------------
  7 |   |   |   |   |   |   |   |   |   |   | 12
    -----------------------------------------
  8 |   |   |   |   |   |   |   |   |   |   | 11
    -----------------------------------------
  9 |   |   |   |   |   |   |   |   |   |   | 10
    -----------------------------------------
 10 |   |   | D |   |   |   |   |   |   |   | 9
    -----------------------------------------
 11 |   |   | D |   |   |   |   |   |   |   | 8
    -----------------------------------------
 12 |   |   | D |   |   |   |   |   |   |   | 7
    -----------------------------------------
 13 | E |   | D | B |   |   | C |   |   |   | 6
    -----------------------------------------
 14 | E |   |   | B |   |   | C |   |   |   | 5
    -----------------------------------------
 15 | E | F |   | B |   |   | C |   |   |   | 4
    -----------------------------------------
 16 |   | F | G |   |   |   | C |   |   |   | 3
    -----------------------------------------
 17 |   | F | G | H |   |   | C |   | A |   | 2
    -----------------------------------------
 18 |   | F | G | H |   |   |   |   | A |   | 1
    -----------------------------------------
 19 |   | F | G | H |   |   |   |   |   |   | 0
    -----------------------------------------
      9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0
    -----------------------------------------
                    Player two
    -----------------------------------------
Ship Placed2 3 19
    -----------------------------------------
                    Player one
    -----------------------------------------
      0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
    -----------------------------------------
  0 |   |   |   |   |   |   |   |   |   |   | 19
    -----------------------------------------
  1 |   |   |   |   |   |   |   |   |   |   | 18
    -----------------------------------------
  2 |   |   |   |   |   |   |   |   |   |   | 17
    -----------------------------------------
  3 |   |   |   |   |   |   |   |   |   |   | 16
    -----------------------------------------
  4 |   |   |   |   |   |   |   |   |   |   | 15
    -----------------------------------------
  5 |   |   |   |   |   |   |   |   |   |   | 14
    -----------------------------------------
  6 |   |   |   |   |   |   |   |   |   |   | 13
    -----------------------------------------
  7 |   |   |   |   |   |   |   |   |   |   | 12
    -----------------------------------------
  8 |   |   |   |   |   |   |   |   |   |   | 11
    -----------------------------------------
  9 |   |   |   |   |   |   |   |   |   |   | 10
    -----------------------------------------
 10 |   |   | D |   |   |   |   |   |   |   | 9
    -----------------------------------------
 11 |   |   | D |   |   |   |   |   |   |   | 8
    -----------------------------------------
 12 |   |   | D |   |   |   |   |   |   |   | 7
    -----------------------------------------
 13 | E |   | D | B |   |   | C |   |   |   | 6
    -----------------------------------------
 14 | E |   |   | B |   |   | C |   |   |   | 5
    -----------------------------------------
 15 | E | F |   | B |   |   | C |   |   |   | 4
    -----------------------------------------
 16 |   | F | G |   |   |   | C |   |   |   | 3
    -----------------------------------------
 17 |   | F | G | H | I |   | C |   | A |   | 2
    -----------------------------------------
 18 |   | F | G | H | I |   |   |   | A |   | 1
    -----------------------------------------
 19 |   | F | G | H | I |   |   |   |   |   | 0
    -----------------------------------------
      9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0
    -----------------------------------------
                    Player two
    -----------------------------------------
Ship Placed3 4 19
    -----------------------------------------
                    Player one
    -----------------------------------------
      0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
    -----------------------------------------
  0 |   |   |   |   |   |   |   |   |   |   | 19
    -----------------------------------------
  1 |   |   |   |   |   |   |   |   |   |   | 18
    -----------------------------------------
  2 |   |   |   |   |   |   |   |   |   |   | 17
    -----------------------------------------
  3 |   |   |   |   |   |   |   |   |   |   | 16
    -----------------------------------------
  4 |   |   |   |   |   |   |   |   |   |   | 15
    -----------------------------------------
  5 |   |   |   |   |   |   |   |   |   |   | 14
    -----------------------------------------
  6 |   |   |   |   |   |   |   |   |   |   | 13
    -----------------------------------------
  7 |   |   |   |   |   |   |   |   |   |   | 12
    -----------------------------------------
  8 |   |   |   |   |   |   |   |   |   |   | 11
    -----------------------------------------
  9 |   |   |   |   |   |   |   |   |   |   | 10
    -----------------------------------------
 10 |   |   | D |   |   |   |   |   |   |   | 9
    -----------------------------------------
 11 |   |   | D |   |   |   |   |   |   |   | 8
    -----------------------------------------
 12 |   |   | D |   |   |   |   |   |   |   | 7
    -----------------------------------------
 13 | E |   | D | B |   |   | C |   |   |   | 6
    -----------------------------------------
 14 | E |   |   | B |   |   | C |   |   |   | 5
    -----------------------------------------
 15 | E | F |   | B |   |   | C |   |   |   | 4
    -----------------------------------------
 16 |   | F | G |   |   |   | C |   |   |   | 3
    -----------------------------------------
 17 |   | F | G | H | I |   | C |   | A |   | 2
    -----------------------------------------
 18 |   | F | G | H | I | J |   |   | A |   | 1
    -----------------------------------------
 19 |   | F | G | H | I | J |   |   |   |   | 0
    -----------------------------------------
      9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0
    -----------------------------------------
                    Player two
    -----------------------------------------
Ship Placed4 5 19
[2018-04-10 16:52:42] Client disconnected from server.


The data the client i sending over to the server:

1|19
2|19
3|19
4|19
5|19

it looks like the server is not flipping the X|Y coordinates correctly. Important here is is this a problem by me (my server) or as well as the server at the uni. I will investigate this further by pulling down the latest and build.

@simonrenger
Copy link
Contributor Author

simonrenger commented Apr 10, 2018

I created a diffrent test case:
The inital data I send to the server is:

Ship type x y
0 3 6
1 7 9
2 6 6
3 9 6
4 1 2

for both clients


[2018-04-10 17:51:22] RakNet started.
[2018-04-10 17:51:22] Server socket [60000] open for receive.
[2018-04-10 17:52:20] New incoming connection.
[2018-04-10 17:52:20] Client [170636] attempt to login with pass [232246529].
[2018-04-10 17:52:20] Successful login for client [170636] with pass [232246529].
[2018-04-10 17:52:20] Client [Simon Renger / 3781878816] added to waiting queue for game lobby [BATTLESHIPS].
[2018-04-10 17:52:25] New incoming connection.
[2018-04-10 17:52:25] Client [160664] attempt to login with pass [232246529].
[2018-04-10 17:52:25] Successful login for client [160664] with pass [232246529].
[2018-04-10 17:52:25] Client [Maiko Steeman / 850389694] added to waiting queue for game lobby [BATTLESHIPS].
[2018-04-10 17:52:25] New game [BATTLESHIPS / 3881161174] starting for client [Simon Renger / 3781878816].
[2018-04-10 17:52:25] New game [BATTLESHIPS / 3881161174] starting for client [Maiko Steeman / 850389694].
8|17
    -----------------------------------------
                    Player two
    -----------------------------------------
      0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
    -----------------------------------------
  0 |   |   |   |   |   |   |   |   |   |   | 19
    -----------------------------------------
  1 |   | A |   |   |   |   |   |   |   |   | 18
    -----------------------------------------
  2 |   | A |   |   |   |   |   |   |   |   | 17
    -----------------------------------------
  3 |   |   |   |   |   |   |   |   |   |   | 16
    -----------------------------------------
  4 |   |   |   |   |   |   |   |   |   |   | 15
    -----------------------------------------
  5 |   |   |   |   |   |   |   |   |   |   | 14
    -----------------------------------------
  6 |   |   |   |   |   |   |   |   |   |   | 13
    -----------------------------------------
  7 |   |   |   |   |   |   |   |   |   |   | 12
    -----------------------------------------
  8 |   |   |   |   |   |   |   |   |   |   | 11
    -----------------------------------------
  9 |   |   |   |   |   |   |   |   |   |   | 10
    -----------------------------------------
 10 |   |   |   |   |   |   |   |   |   |   | 9
    -----------------------------------------
 11 |   |   |   |   |   |   |   |   |   |   | 8
    -----------------------------------------
 12 |   |   |   |   |   |   |   |   |   |   | 7
    -----------------------------------------
 13 |   |   |   |   |   |   |   |   |   |   | 6
    -----------------------------------------
 14 |   |   |   |   |   |   |   |   |   |   | 5
    -----------------------------------------
 15 |   |   |   |   |   |   |   |   |   |   | 4
    -----------------------------------------
 16 |   |   |   |   |   |   |   |   |   |   | 3
    -----------------------------------------
 17 |   |   |   |   |   |   |   |   |   |   | 2
    -----------------------------------------
 18 |   |   |   |   |   |   |   |   |   |   | 1
    -----------------------------------------
 19 |   |   |   |   |   |   |   |   |   |   | 0
    -----------------------------------------
      9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0
    -----------------------------------------
                    Player one
    -----------------------------------------
3|13
    -----------------------------------------
                    Player two
    -----------------------------------------
      0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
    -----------------------------------------
  0 |   |   |   |   |   |   |   |   |   |   | 19
    -----------------------------------------
  1 |   | A |   |   |   |   |   |   |   |   | 18
    -----------------------------------------
  2 |   | A |   |   |   |   |   |   |   |   | 17
    -----------------------------------------
  3 |   |   |   |   |   |   |   |   |   |   | 16
    -----------------------------------------
  4 |   |   |   |   |   |   | B |   |   |   | 15
    -----------------------------------------
  5 |   |   |   |   |   |   | B |   |   |   | 14
    -----------------------------------------
  6 |   |   |   |   |   |   | B |   |   |   | 13
    -----------------------------------------
  7 |   |   |   |   |   |   |   |   |   |   | 12
    -----------------------------------------
  8 |   |   |   |   |   |   |   |   |   |   | 11
    -----------------------------------------
  9 |   |   |   |   |   |   |   |   |   |   | 10
    -----------------------------------------
 10 |   |   |   |   |   |   |   |   |   |   | 9
    -----------------------------------------
 11 |   |   |   |   |   |   |   |   |   |   | 8
    -----------------------------------------
 12 |   |   |   |   |   |   |   |   |   |   | 7
    -----------------------------------------
 13 |   |   |   |   |   |   |   |   |   |   | 6
    -----------------------------------------
 14 |   |   |   |   |   |   |   |   |   |   | 5
    -----------------------------------------
 15 |   |   |   |   |   |   |   |   |   |   | 4
    -----------------------------------------
 16 |   |   |   |   |   |   |   |   |   |   | 3
    -----------------------------------------
 17 |   |   |   |   |   |   |   |   |   |   | 2
    -----------------------------------------
 18 |   |   |   |   |   |   |   |   |   |   | 1
    -----------------------------------------
 19 |   |   |   |   |   |   |   |   |   |   | 0
    -----------------------------------------
      9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0
    -----------------------------------------
                    Player one
    -----------------------------------------
6|13
    -----------------------------------------
                    Player two
    -----------------------------------------
      0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
    -----------------------------------------
  0 |   |   |   |   |   |   |   |   |   |   | 19
    -----------------------------------------
  1 |   | A |   |   |   |   |   |   |   |   | 18
    -----------------------------------------
  2 |   | A |   | C |   |   |   |   |   |   | 17
    -----------------------------------------
  3 |   |   |   | C |   |   |   |   |   |   | 16
    -----------------------------------------
  4 |   |   |   | C |   |   | B |   |   |   | 15
    -----------------------------------------
  5 |   |   |   | C |   |   | B |   |   |   | 14
    -----------------------------------------
  6 |   |   |   | C |   |   | B |   |   |   | 13
    -----------------------------------------
  7 |   |   |   |   |   |   |   |   |   |   | 12
    -----------------------------------------
  8 |   |   |   |   |   |   |   |   |   |   | 11
    -----------------------------------------
  9 |   |   |   |   |   |   |   |   |   |   | 10
    -----------------------------------------
 10 |   |   |   |   |   |   |   |   |   |   | 9
    -----------------------------------------
 11 |   |   |   |   |   |   |   |   |   |   | 8
    -----------------------------------------
 12 |   |   |   |   |   |   |   |   |   |   | 7
    -----------------------------------------
 13 |   |   |   |   |   |   |   |   |   |   | 6
    -----------------------------------------
 14 |   |   |   |   |   |   |   |   |   |   | 5
    -----------------------------------------
 15 |   |   |   |   |   |   |   |   |   |   | 4
    -----------------------------------------
 16 |   |   |   |   |   |   |   |   |   |   | 3
    -----------------------------------------
 17 |   |   |   |   |   |   |   |   |   |   | 2
    -----------------------------------------
 18 |   |   |   |   |   |   |   |   |   |   | 1
    -----------------------------------------
 19 |   |   |   |   |   |   |   |   |   |   | 0
    -----------------------------------------
      9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0
    -----------------------------------------
                    Player one
    -----------------------------------------
2|10
    -----------------------------------------
                    Player two
    -----------------------------------------
      0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
    -----------------------------------------
  0 |   |   |   |   |   |   |   |   |   |   | 19
    -----------------------------------------
  1 |   | A |   |   |   |   |   |   |   |   | 18
    -----------------------------------------
  2 |   | A |   | C |   |   |   |   |   |   | 17
    -----------------------------------------
  3 |   |   |   | C |   |   |   |   |   |   | 16
    -----------------------------------------
  4 |   |   |   | C |   |   | B |   |   |   | 15
    -----------------------------------------
  5 |   |   |   | C |   |   | B |   |   |   | 14
    -----------------------------------------
  6 |   |   |   | C |   |   | B | D |   |   | 13
    -----------------------------------------
  7 |   |   |   |   |   |   |   | D |   |   | 12
    -----------------------------------------
  8 |   |   |   |   |   |   |   | D |   |   | 11
    -----------------------------------------
  9 |   |   |   |   |   |   |   | D |   |   | 10
    -----------------------------------------
 10 |   |   |   |   |   |   |   |   |   |   | 9
    -----------------------------------------
 11 |   |   |   |   |   |   |   |   |   |   | 8
    -----------------------------------------
 12 |   |   |   |   |   |   |   |   |   |   | 7
    -----------------------------------------
 13 |   |   |   |   |   |   |   |   |   |   | 6
    -----------------------------------------
 14 |   |   |   |   |   |   |   |   |   |   | 5
    -----------------------------------------
 15 |   |   |   |   |   |   |   |   |   |   | 4
    -----------------------------------------
 16 |   |   |   |   |   |   |   |   |   |   | 3
    -----------------------------------------
 17 |   |   |   |   |   |   |   |   |   |   | 2
    -----------------------------------------
 18 |   |   |   |   |   |   |   |   |   |   | 1
    -----------------------------------------
 19 |   |   |   |   |   |   |   |   |   |   | 0
    -----------------------------------------
      9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0
    -----------------------------------------
                    Player one
    -----------------------------------------
0|13
    -----------------------------------------
                    Player two
    -----------------------------------------
      0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
    -----------------------------------------
  0 |   |   |   |   |   |   |   |   |   |   | 19
    -----------------------------------------
  1 |   | A |   |   |   |   |   |   |   |   | 18
    -----------------------------------------
  2 |   | A |   | C |   |   |   |   |   |   | 17
    -----------------------------------------
  3 |   |   |   | C |   |   |   |   |   |   | 16
    -----------------------------------------
  4 |   |   |   | C |   |   | B |   |   | E | 15
    -----------------------------------------
  5 |   |   |   | C |   |   | B |   |   | E | 14
    -----------------------------------------
  6 |   |   |   | C |   |   | B | D |   | E | 13
    -----------------------------------------
  7 |   |   |   |   |   |   |   | D |   |   | 12
    -----------------------------------------
  8 |   |   |   |   |   |   |   | D |   |   | 11
    -----------------------------------------
  9 |   |   |   |   |   |   |   | D |   |   | 10
    -----------------------------------------
 10 |   |   |   |   |   |   |   |   |   |   | 9
    -----------------------------------------
 11 |   |   |   |   |   |   |   |   |   |   | 8
    -----------------------------------------
 12 |   |   |   |   |   |   |   |   |   |   | 7
    -----------------------------------------
 13 |   |   |   |   |   |   |   |   |   |   | 6
    -----------------------------------------
 14 |   |   |   |   |   |   |   |   |   |   | 5
    -----------------------------------------
 15 |   |   |   |   |   |   |   |   |   |   | 4
    -----------------------------------------
 16 |   |   |   |   |   |   |   |   |   |   | 3
    -----------------------------------------
 17 |   |   |   |   |   |   |   |   |   |   | 2
    -----------------------------------------
 18 |   |   |   |   |   |   |   |   |   |   | 1
    -----------------------------------------
 19 |   |   |   |   |   |   |   |   |   |   | 0
    -----------------------------------------
      9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0
    -----------------------------------------
                    Player one
    -----------------------------------------
1|2
    -----------------------------------------
                    Player one
    -----------------------------------------
      0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
    -----------------------------------------
  0 |   |   |   |   |   |   |   |   |   |   | 19
    -----------------------------------------
  1 |   | F |   |   |   |   |   |   |   |   | 18
    -----------------------------------------
  2 |   | F |   |   |   |   |   |   |   |   | 17
    -----------------------------------------
  3 |   |   |   |   |   |   |   |   |   |   | 16
    -----------------------------------------
  4 |   |   |   |   |   |   |   |   |   |   | 15
    -----------------------------------------
  5 |   |   |   |   |   |   |   |   |   |   | 14
    -----------------------------------------
  6 |   |   |   |   |   |   |   |   |   |   | 13
    -----------------------------------------
  7 |   |   |   |   |   |   |   |   |   |   | 12
    -----------------------------------------
  8 |   |   |   |   |   |   |   |   |   |   | 11
    -----------------------------------------
  9 |   |   |   |   |   |   |   |   |   |   | 10
    -----------------------------------------
 10 |   |   | D |   |   |   |   |   |   |   | 9
    -----------------------------------------
 11 |   |   | D |   |   |   |   |   |   |   | 8
    -----------------------------------------
 12 |   |   | D |   |   |   |   |   |   |   | 7
    -----------------------------------------
 13 | E |   | D | B |   |   | C |   |   |   | 6
    -----------------------------------------
 14 | E |   |   | B |   |   | C |   |   |   | 5
    -----------------------------------------
 15 | E |   |   | B |   |   | C |   |   |   | 4
    -----------------------------------------
 16 |   |   |   |   |   |   | C |   |   |   | 3
    -----------------------------------------
 17 |   |   |   |   |   |   | C |   | A |   | 2
    -----------------------------------------
 18 |   |   |   |   |   |   |   |   | A |   | 1
    -----------------------------------------
 19 |   |   |   |   |   |   |   |   |   |   | 0
    -----------------------------------------
      9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0
    -----------------------------------------
                    Player two
    -----------------------------------------
6|6
    -----------------------------------------
                    Player one
    -----------------------------------------
      0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
    -----------------------------------------
  0 |   |   |   |   |   |   |   |   |   |   | 19
    -----------------------------------------
  1 |   | F |   |   |   |   |   |   |   |   | 18
    -----------------------------------------
  2 |   | F |   |   |   |   |   |   |   |   | 17
    -----------------------------------------
  3 |   |   |   |   |   |   |   |   |   |   | 16
    -----------------------------------------
  4 |   |   |   |   |   |   | G |   |   |   | 15
    -----------------------------------------
  5 |   |   |   |   |   |   | G |   |   |   | 14
    -----------------------------------------
  6 |   |   |   |   |   |   | G |   |   |   | 13
    -----------------------------------------
  7 |   |   |   |   |   |   |   |   |   |   | 12
    -----------------------------------------
  8 |   |   |   |   |   |   |   |   |   |   | 11
    -----------------------------------------
  9 |   |   |   |   |   |   |   |   |   |   | 10
    -----------------------------------------
 10 |   |   | D |   |   |   |   |   |   |   | 9
    -----------------------------------------
 11 |   |   | D |   |   |   |   |   |   |   | 8
    -----------------------------------------
 12 |   |   | D |   |   |   |   |   |   |   | 7
    -----------------------------------------
 13 | E |   | D | B |   |   | C |   |   |   | 6
    -----------------------------------------
 14 | E |   |   | B |   |   | C |   |   |   | 5
    -----------------------------------------
 15 | E |   |   | B |   |   | C |   |   |   | 4
    -----------------------------------------
 16 |   |   |   |   |   |   | C |   |   |   | 3
    -----------------------------------------
 17 |   |   |   |   |   |   | C |   | A |   | 2
    -----------------------------------------
 18 |   |   |   |   |   |   |   |   | A |   | 1
    -----------------------------------------
 19 |   |   |   |   |   |   |   |   |   |   | 0
    -----------------------------------------
      9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0
    -----------------------------------------
                    Player two
    -----------------------------------------
3|6
    -----------------------------------------
                    Player one
    -----------------------------------------
      0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
    -----------------------------------------
  0 |   |   |   |   |   |   |   |   |   |   | 19
    -----------------------------------------
  1 |   | F |   |   |   |   |   |   |   |   | 18
    -----------------------------------------
  2 |   | F |   | H |   |   |   |   |   |   | 17
    -----------------------------------------
  3 |   |   |   | H |   |   |   |   |   |   | 16
    -----------------------------------------
  4 |   |   |   | H |   |   | G |   |   |   | 15
    -----------------------------------------
  5 |   |   |   | H |   |   | G |   |   |   | 14
    -----------------------------------------
  6 |   |   |   | H |   |   | G |   |   |   | 13
    -----------------------------------------
  7 |   |   |   |   |   |   |   |   |   |   | 12
    -----------------------------------------
  8 |   |   |   |   |   |   |   |   |   |   | 11
    -----------------------------------------
  9 |   |   |   |   |   |   |   |   |   |   | 10
    -----------------------------------------
 10 |   |   | D |   |   |   |   |   |   |   | 9
    -----------------------------------------
 11 |   |   | D |   |   |   |   |   |   |   | 8
    -----------------------------------------
 12 |   |   | D |   |   |   |   |   |   |   | 7
    -----------------------------------------
 13 | E |   | D | B |   |   | C |   |   |   | 6
    -----------------------------------------
 14 | E |   |   | B |   |   | C |   |   |   | 5
    -----------------------------------------
 15 | E |   |   | B |   |   | C |   |   |   | 4
    -----------------------------------------
 16 |   |   |   |   |   |   | C |   |   |   | 3
    -----------------------------------------
 17 |   |   |   |   |   |   | C |   | A |   | 2
    -----------------------------------------
 18 |   |   |   |   |   |   |   |   | A |   | 1
    -----------------------------------------
 19 |   |   |   |   |   |   |   |   |   |   | 0
    -----------------------------------------
      9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0
    -----------------------------------------
                    Player two
    -----------------------------------------
7|9
    -----------------------------------------
                    Player one
    -----------------------------------------
      0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
    -----------------------------------------
  0 |   |   |   |   |   |   |   |   |   |   | 19
    -----------------------------------------
  1 |   | F |   |   |   |   |   |   |   |   | 18
    -----------------------------------------
  2 |   | F |   | H |   |   |   |   |   |   | 17
    -----------------------------------------
  3 |   |   |   | H |   |   |   |   |   |   | 16
    -----------------------------------------
  4 |   |   |   | H |   |   | G |   |   |   | 15
    -----------------------------------------
  5 |   |   |   | H |   |   | G |   |   |   | 14
    -----------------------------------------
  6 |   |   |   | H |   |   | G | I |   |   | 13
    -----------------------------------------
  7 |   |   |   |   |   |   |   | I |   |   | 12
    -----------------------------------------
  8 |   |   |   |   |   |   |   | I |   |   | 11
    -----------------------------------------
  9 |   |   |   |   |   |   |   | I |   |   | 10
    -----------------------------------------
 10 |   |   | D |   |   |   |   |   |   |   | 9
    -----------------------------------------
 11 |   |   | D |   |   |   |   |   |   |   | 8
    -----------------------------------------
 12 |   |   | D |   |   |   |   |   |   |   | 7
    -----------------------------------------
 13 | E |   | D | B |   |   | C |   |   |   | 6
    -----------------------------------------
 14 | E |   |   | B |   |   | C |   |   |   | 5
    -----------------------------------------
 15 | E |   |   | B |   |   | C |   |   |   | 4
    -----------------------------------------
 16 |   |   |   |   |   |   | C |   |   |   | 3
    -----------------------------------------
 17 |   |   |   |   |   |   | C |   | A |   | 2
    -----------------------------------------
 18 |   |   |   |   |   |   |   |   | A |   | 1
    -----------------------------------------
 19 |   |   |   |   |   |   |   |   |   |   | 0
    -----------------------------------------
      9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0
    -----------------------------------------
                    Player two
    -----------------------------------------
9|6
    -----------------------------------------
                    Player one
    -----------------------------------------
      0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
    -----------------------------------------
  0 |   |   |   |   |   |   |   |   |   |   | 19
    -----------------------------------------
  1 |   | F |   |   |   |   |   |   |   |   | 18
    -----------------------------------------
  2 |   | F |   | H |   |   |   |   |   |   | 17
    -----------------------------------------
  3 |   |   |   | H |   |   |   |   |   |   | 16
    -----------------------------------------
  4 |   |   |   | H |   |   | G |   |   | J | 15
    -----------------------------------------
  5 |   |   |   | H |   |   | G |   |   | J | 14
    -----------------------------------------
  6 |   |   |   | H |   |   | G | I |   | J | 13
    -----------------------------------------
  7 |   |   |   |   |   |   |   | I |   |   | 12
    -----------------------------------------
  8 |   |   |   |   |   |   |   | I |   |   | 11
    -----------------------------------------
  9 |   |   |   |   |   |   |   | I |   |   | 10
    -----------------------------------------
 10 |   |   | D |   |   |   |   |   |   |   | 9
    -----------------------------------------
 11 |   |   | D |   |   |   |   |   |   |   | 8
    -----------------------------------------
 12 |   |   | D |   |   |   |   |   |   |   | 7
    -----------------------------------------
 13 | E |   | D | B |   |   | C |   |   |   | 6
    -----------------------------------------
 14 | E |   |   | B |   |   | C |   |   |   | 5
    -----------------------------------------
 15 | E |   |   | B |   |   | C |   |   |   | 4
    -----------------------------------------
 16 |   |   |   |   |   |   | C |   |   |   | 3
    -----------------------------------------
 17 |   |   |   |   |   |   | C |   | A |   | 2
    -----------------------------------------
 18 |   |   |   |   |   |   |   |   | A |   | 1
    -----------------------------------------
 19 |   |   |   |   |   |   |   |   |   |   | 0
    -----------------------------------------
      9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0
    -----------------------------------------
                    Player two
    -----------------------------------------

This time it works.... so there might be then the issue on my side.
I have anew assumption: When ever I send data over which is bigger then 10 I have this issue. I will test this next.

@simonrenger
Copy link
Contributor Author

simonrenger commented Apr 10, 2018

The result of my "research" is that when ever the server gets mixed values such as in the first example it gets confused and places them inside of the same 10x10 grid.
Example 1: Correct setting:

Ship type x y
0 5 9
1 3 9
2 0 9
3 2 9
4 4 9
4|10
    -----------------------------------------
                    Player two
    -----------------------------------------
      0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
    -----------------------------------------
  0 |   |   |   |   |   |   |   |   |   |   | 19
    -----------------------------------------
  1 |   |   |   |   |   |   |   |   |   |   | 18
    -----------------------------------------
  2 |   |   |   |   |   |   |   |   |   |   | 17
    -----------------------------------------
  3 |   |   |   |   |   |   |   |   |   |   | 16
    -----------------------------------------
  4 |   |   |   |   |   |   |   |   |   |   | 15
    -----------------------------------------
  5 |   |   |   |   |   |   |   |   |   |   | 14
    -----------------------------------------
  6 |   |   |   |   |   |   |   |   |   |   | 13
    -----------------------------------------
  7 |   |   |   |   |   |   |   |   |   |   | 12
    -----------------------------------------
  8 |   |   |   |   |   | A |   |   |   |   | 11
    -----------------------------------------
  9 |   |   |   |   |   | A |   |   |   |   | 10
    -----------------------------------------
 10 |   |   |   |   |   |   |   |   |   |   | 9
    -----------------------------------------
 11 |   |   |   |   |   |   |   |   |   |   | 8
    -----------------------------------------
 12 |   |   |   |   |   |   |   |   |   |   | 7
    -----------------------------------------
 13 |   |   |   |   |   |   |   |   |   |   | 6
    -----------------------------------------
 14 |   |   |   |   |   |   |   |   |   |   | 5
    -----------------------------------------
 15 |   |   |   |   |   |   |   |   |   |   | 4
    -----------------------------------------
 16 |   |   |   |   |   |   |   |   |   |   | 3
    -----------------------------------------
 17 |   |   |   |   |   |   |   |   |   |   | 2
    -----------------------------------------
 18 |   |   |   |   |   |   |   |   |   |   | 1
    -----------------------------------------
 19 |   |   |   |   |   |   |   |   |   |   | 0
    -----------------------------------------
      9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0
    -----------------------------------------
                    Player one
    -----------------------------------------
6|10
    -----------------------------------------
                    Player two
    -----------------------------------------
      0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
    -----------------------------------------
  0 |   |   |   |   |   |   |   |   |   |   | 19
    -----------------------------------------
  1 |   |   |   |   |   |   |   |   |   |   | 18
    -----------------------------------------
  2 |   |   |   |   |   |   |   |   |   |   | 17
    -----------------------------------------
  3 |   |   |   |   |   |   |   |   |   |   | 16
    -----------------------------------------
  4 |   |   |   |   |   |   |   |   |   |   | 15
    -----------------------------------------
  5 |   |   |   |   |   |   |   |   |   |   | 14
    -----------------------------------------
  6 |   |   |   |   |   |   |   |   |   |   | 13
    -----------------------------------------
  7 |   |   |   | B |   |   |   |   |   |   | 12
    -----------------------------------------
  8 |   |   |   | B |   | A |   |   |   |   | 11
    -----------------------------------------
  9 |   |   |   | B |   | A |   |   |   |   | 10
    -----------------------------------------
 10 |   |   |   |   |   |   |   |   |   |   | 9
    -----------------------------------------
 11 |   |   |   |   |   |   |   |   |   |   | 8
    -----------------------------------------
 12 |   |   |   |   |   |   |   |   |   |   | 7
    -----------------------------------------
 13 |   |   |   |   |   |   |   |   |   |   | 6
    -----------------------------------------
 14 |   |   |   |   |   |   |   |   |   |   | 5
    -----------------------------------------
 15 |   |   |   |   |   |   |   |   |   |   | 4
    -----------------------------------------
 16 |   |   |   |   |   |   |   |   |   |   | 3
    -----------------------------------------
 17 |   |   |   |   |   |   |   |   |   |   | 2
    -----------------------------------------
 18 |   |   |   |   |   |   |   |   |   |   | 1
    -----------------------------------------
 19 |   |   |   |   |   |   |   |   |   |   | 0
    -----------------------------------------
      9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0
    -----------------------------------------
                    Player one
    -----------------------------------------
9|10
    -----------------------------------------
                    Player two
    -----------------------------------------
      0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
    -----------------------------------------
  0 |   |   |   |   |   |   |   |   |   |   | 19
    -----------------------------------------
  1 |   |   |   |   |   |   |   |   |   |   | 18
    -----------------------------------------
  2 |   |   |   |   |   |   |   |   |   |   | 17
    -----------------------------------------
  3 |   |   |   |   |   |   |   |   |   |   | 16
    -----------------------------------------
  4 |   |   |   |   |   |   |   |   |   |   | 15
    -----------------------------------------
  5 | C |   |   |   |   |   |   |   |   |   | 14
    -----------------------------------------
  6 | C |   |   |   |   |   |   |   |   |   | 13
    -----------------------------------------
  7 | C |   |   | B |   |   |   |   |   |   | 12
    -----------------------------------------
  8 | C |   |   | B |   | A |   |   |   |   | 11
    -----------------------------------------
  9 | C |   |   | B |   | A |   |   |   |   | 10
    -----------------------------------------
 10 |   |   |   |   |   |   |   |   |   |   | 9
    -----------------------------------------
 11 |   |   |   |   |   |   |   |   |   |   | 8
    -----------------------------------------
 12 |   |   |   |   |   |   |   |   |   |   | 7
    -----------------------------------------
 13 |   |   |   |   |   |   |   |   |   |   | 6
    -----------------------------------------
 14 |   |   |   |   |   |   |   |   |   |   | 5
    -----------------------------------------
 15 |   |   |   |   |   |   |   |   |   |   | 4
    -----------------------------------------
 16 |   |   |   |   |   |   |   |   |   |   | 3
    -----------------------------------------
 17 |   |   |   |   |   |   |   |   |   |   | 2
    -----------------------------------------
 18 |   |   |   |   |   |   |   |   |   |   | 1
    -----------------------------------------
 19 |   |   |   |   |   |   |   |   |   |   | 0
    -----------------------------------------
      9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0
    -----------------------------------------
                    Player one
    -----------------------------------------
7|10
    -----------------------------------------
                    Player two
    -----------------------------------------
      0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
    -----------------------------------------
  0 |   |   |   |   |   |   |   |   |   |   | 19
    -----------------------------------------
  1 |   |   |   |   |   |   |   |   |   |   | 18
    -----------------------------------------
  2 |   |   |   |   |   |   |   |   |   |   | 17
    -----------------------------------------
  3 |   |   |   |   |   |   |   |   |   |   | 16
    -----------------------------------------
  4 |   |   |   |   |   |   |   |   |   |   | 15
    -----------------------------------------
  5 | C |   |   |   |   |   |   |   |   |   | 14
    -----------------------------------------
  6 | C |   | D |   |   |   |   |   |   |   | 13
    -----------------------------------------
  7 | C |   | D | B |   |   |   |   |   |   | 12
    -----------------------------------------
  8 | C |   | D | B |   | A |   |   |   |   | 11
    -----------------------------------------
  9 | C |   | D | B |   | A |   |   |   |   | 10
    -----------------------------------------
 10 |   |   |   |   |   |   |   |   |   |   | 9
    -----------------------------------------
 11 |   |   |   |   |   |   |   |   |   |   | 8
    -----------------------------------------
 12 |   |   |   |   |   |   |   |   |   |   | 7
    -----------------------------------------
 13 |   |   |   |   |   |   |   |   |   |   | 6
    -----------------------------------------
 14 |   |   |   |   |   |   |   |   |   |   | 5
    -----------------------------------------
 15 |   |   |   |   |   |   |   |   |   |   | 4
    -----------------------------------------
 16 |   |   |   |   |   |   |   |   |   |   | 3
    -----------------------------------------
 17 |   |   |   |   |   |   |   |   |   |   | 2
    -----------------------------------------
 18 |   |   |   |   |   |   |   |   |   |   | 1
    -----------------------------------------
 19 |   |   |   |   |   |   |   |   |   |   | 0
    -----------------------------------------
      9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0
    -----------------------------------------
                    Player one
    -----------------------------------------
5|10
    -----------------------------------------
                    Player two
    -----------------------------------------
      0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
    -----------------------------------------
  0 |   |   |   |   |   |   |   |   |   |   | 19
    -----------------------------------------
  1 |   |   |   |   |   |   |   |   |   |   | 18
    -----------------------------------------
  2 |   |   |   |   |   |   |   |   |   |   | 17
    -----------------------------------------
  3 |   |   |   |   |   |   |   |   |   |   | 16
    -----------------------------------------
  4 |   |   |   |   |   |   |   |   |   |   | 15
    -----------------------------------------
  5 | C |   |   |   |   |   |   |   |   |   | 14
    -----------------------------------------
  6 | C |   | D |   |   |   |   |   |   |   | 13
    -----------------------------------------
  7 | C |   | D | B | E |   |   |   |   |   | 12
    -----------------------------------------
  8 | C |   | D | B | E | A |   |   |   |   | 11
    -----------------------------------------
  9 | C |   | D | B | E | A |   |   |   |   | 10
    -----------------------------------------
 10 |   |   |   |   |   |   |   |   |   |   | 9
    -----------------------------------------
 11 |   |   |   |   |   |   |   |   |   |   | 8
    -----------------------------------------
 12 |   |   |   |   |   |   |   |   |   |   | 7
    -----------------------------------------
 13 |   |   |   |   |   |   |   |   |   |   | 6
    -----------------------------------------
 14 |   |   |   |   |   |   |   |   |   |   | 5
    -----------------------------------------
 15 |   |   |   |   |   |   |   |   |   |   | 4
    -----------------------------------------
 16 |   |   |   |   |   |   |   |   |   |   | 3
    -----------------------------------------
 17 |   |   |   |   |   |   |   |   |   |   | 2
    -----------------------------------------
 18 |   |   |   |   |   |   |   |   |   |   | 1
    -----------------------------------------
 19 |   |   |   |   |   |   |   |   |   |   | 0
    -----------------------------------------
      9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0
    -----------------------------------------
                    Player one
    -----------------------------------------
5|9
    -----------------------------------------
                    Player one
    -----------------------------------------
      0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
    -----------------------------------------
  0 |   |   |   |   |   |   |   |   |   |   | 19
    -----------------------------------------
  1 |   |   |   |   |   |   |   |   |   |   | 18
    -----------------------------------------
  2 |   |   |   |   |   |   |   |   |   |   | 17
    -----------------------------------------
  3 |   |   |   |   |   |   |   |   |   |   | 16
    -----------------------------------------
  4 |   |   |   |   |   |   |   |   |   |   | 15
    -----------------------------------------
  5 |   |   |   |   |   |   |   |   |   |   | 14
    -----------------------------------------
  6 |   |   |   |   |   |   |   |   |   |   | 13
    -----------------------------------------
  7 |   |   |   |   |   |   |   |   |   |   | 12
    -----------------------------------------
  8 |   |   |   |   |   | F |   |   |   |   | 11
    -----------------------------------------
  9 |   |   |   |   |   | F |   |   |   |   | 10
    -----------------------------------------
 10 |   |   |   |   | A | E | B | D |   | C | 9
    -----------------------------------------
 11 |   |   |   |   | A | E | B | D |   | C | 8
    -----------------------------------------
 12 |   |   |   |   |   | E | B | D |   | C | 7
    -----------------------------------------
 13 |   |   |   |   |   |   |   | D |   | C | 6
    -----------------------------------------
 14 |   |   |   |   |   |   |   |   |   | C | 5
    -----------------------------------------
 15 |   |   |   |   |   |   |   |   |   |   | 4
    -----------------------------------------
 16 |   |   |   |   |   |   |   |   |   |   | 3
    -----------------------------------------
 17 |   |   |   |   |   |   |   |   |   |   | 2
    -----------------------------------------
 18 |   |   |   |   |   |   |   |   |   |   | 1
    -----------------------------------------
 19 |   |   |   |   |   |   |   |   |   |   | 0
    -----------------------------------------
      9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0
    -----------------------------------------
                    Player two
    -----------------------------------------
3|9
    -----------------------------------------
                    Player one
    -----------------------------------------
      0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
    -----------------------------------------
  0 |   |   |   |   |   |   |   |   |   |   | 19
    -----------------------------------------
  1 |   |   |   |   |   |   |   |   |   |   | 18
    -----------------------------------------
  2 |   |   |   |   |   |   |   |   |   |   | 17
    -----------------------------------------
  3 |   |   |   |   |   |   |   |   |   |   | 16
    -----------------------------------------
  4 |   |   |   |   |   |   |   |   |   |   | 15
    -----------------------------------------
  5 |   |   |   |   |   |   |   |   |   |   | 14
    -----------------------------------------
  6 |   |   |   |   |   |   |   |   |   |   | 13
    -----------------------------------------
  7 |   |   |   | G |   |   |   |   |   |   | 12
    -----------------------------------------
  8 |   |   |   | G |   | F |   |   |   |   | 11
    -----------------------------------------
  9 |   |   |   | G |   | F |   |   |   |   | 10
    -----------------------------------------
 10 |   |   |   |   | A | E | B | D |   | C | 9
    -----------------------------------------
 11 |   |   |   |   | A | E | B | D |   | C | 8
    -----------------------------------------
 12 |   |   |   |   |   | E | B | D |   | C | 7
    -----------------------------------------
 13 |   |   |   |   |   |   |   | D |   | C | 6
    -----------------------------------------
 14 |   |   |   |   |   |   |   |   |   | C | 5
    -----------------------------------------
 15 |   |   |   |   |   |   |   |   |   |   | 4
    -----------------------------------------
 16 |   |   |   |   |   |   |   |   |   |   | 3
    -----------------------------------------
 17 |   |   |   |   |   |   |   |   |   |   | 2
    -----------------------------------------
 18 |   |   |   |   |   |   |   |   |   |   | 1
    -----------------------------------------
 19 |   |   |   |   |   |   |   |   |   |   | 0
    -----------------------------------------
      9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0
    -----------------------------------------
                    Player two
    -----------------------------------------
0|9
    -----------------------------------------
                    Player one
    -----------------------------------------
      0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
    -----------------------------------------
  0 |   |   |   |   |   |   |   |   |   |   | 19
    -----------------------------------------
  1 |   |   |   |   |   |   |   |   |   |   | 18
    -----------------------------------------
  2 |   |   |   |   |   |   |   |   |   |   | 17
    -----------------------------------------
  3 |   |   |   |   |   |   |   |   |   |   | 16
    -----------------------------------------
  4 |   |   |   |   |   |   |   |   |   |   | 15
    -----------------------------------------
  5 | H |   |   |   |   |   |   |   |   |   | 14
    -----------------------------------------
  6 | H |   |   |   |   |   |   |   |   |   | 13
    -----------------------------------------
  7 | H |   |   | G |   |   |   |   |   |   | 12
    -----------------------------------------
  8 | H |   |   | G |   | F |   |   |   |   | 11
    -----------------------------------------
  9 | H |   |   | G |   | F |   |   |   |   | 10
    -----------------------------------------
 10 |   |   |   |   | A | E | B | D |   | C | 9
    -----------------------------------------
 11 |   |   |   |   | A | E | B | D |   | C | 8
    -----------------------------------------
 12 |   |   |   |   |   | E | B | D |   | C | 7
    -----------------------------------------
 13 |   |   |   |   |   |   |   | D |   | C | 6
    -----------------------------------------
 14 |   |   |   |   |   |   |   |   |   | C | 5
    -----------------------------------------
 15 |   |   |   |   |   |   |   |   |   |   | 4
    -----------------------------------------
 16 |   |   |   |   |   |   |   |   |   |   | 3
    -----------------------------------------
 17 |   |   |   |   |   |   |   |   |   |   | 2
    -----------------------------------------
 18 |   |   |   |   |   |   |   |   |   |   | 1
    -----------------------------------------
 19 |   |   |   |   |   |   |   |   |   |   | 0
    -----------------------------------------
      9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0
    -----------------------------------------
                    Player two
    -----------------------------------------
2|9
    -----------------------------------------
                    Player one
    -----------------------------------------
      0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
    -----------------------------------------
  0 |   |   |   |   |   |   |   |   |   |   | 19
    -----------------------------------------
  1 |   |   |   |   |   |   |   |   |   |   | 18
    -----------------------------------------
  2 |   |   |   |   |   |   |   |   |   |   | 17
    -----------------------------------------
  3 |   |   |   |   |   |   |   |   |   |   | 16
    -----------------------------------------
  4 |   |   |   |   |   |   |   |   |   |   | 15
    -----------------------------------------
  5 | H |   |   |   |   |   |   |   |   |   | 14
    -----------------------------------------
  6 | H |   | I |   |   |   |   |   |   |   | 13
    -----------------------------------------
  7 | H |   | I | G |   |   |   |   |   |   | 12
    -----------------------------------------
  8 | H |   | I | G |   | F |   |   |   |   | 11
    -----------------------------------------
  9 | H |   | I | G |   | F |   |   |   |   | 10
    -----------------------------------------
 10 |   |   |   |   | A | E | B | D |   | C | 9
    -----------------------------------------
 11 |   |   |   |   | A | E | B | D |   | C | 8
    -----------------------------------------
 12 |   |   |   |   |   | E | B | D |   | C | 7
    -----------------------------------------
 13 |   |   |   |   |   |   |   | D |   | C | 6
    -----------------------------------------
 14 |   |   |   |   |   |   |   |   |   | C | 5
    -----------------------------------------
 15 |   |   |   |   |   |   |   |   |   |   | 4
    -----------------------------------------
 16 |   |   |   |   |   |   |   |   |   |   | 3
    -----------------------------------------
 17 |   |   |   |   |   |   |   |   |   |   | 2
    -----------------------------------------
 18 |   |   |   |   |   |   |   |   |   |   | 1
    -----------------------------------------
 19 |   |   |   |   |   |   |   |   |   |   | 0
    -----------------------------------------
      9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0
    -----------------------------------------
                    Player two
    -----------------------------------------
4|9
    -----------------------------------------
                    Player one
    -----------------------------------------
      0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
    -----------------------------------------
  0 |   |   |   |   |   |   |   |   |   |   | 19
    -----------------------------------------
  1 |   |   |   |   |   |   |   |   |   |   | 18
    -----------------------------------------
  2 |   |   |   |   |   |   |   |   |   |   | 17
    -----------------------------------------
  3 |   |   |   |   |   |   |   |   |   |   | 16
    -----------------------------------------
  4 |   |   |   |   |   |   |   |   |   |   | 15
    -----------------------------------------
  5 | H |   |   |   |   |   |   |   |   |   | 14
    -----------------------------------------
  6 | H |   | I |   |   |   |   |   |   |   | 13
    -----------------------------------------
  7 | H |   | I | G | J |   |   |   |   |   | 12
    -----------------------------------------
  8 | H |   | I | G | J | F |   |   |   |   | 11
    -----------------------------------------
  9 | H |   | I | G | J | F |   |   |   |   | 10
    -----------------------------------------
 10 |   |   |   |   | A | E | B | D |   | C | 9
    -----------------------------------------
 11 |   |   |   |   | A | E | B | D |   | C | 8
    -----------------------------------------
 12 |   |   |   |   |   | E | B | D |   | C | 7
    -----------------------------------------
 13 |   |   |   |   |   |   |   | D |   | C | 6
    -----------------------------------------
 14 |   |   |   |   |   |   |   |   |   | C | 5
    -----------------------------------------
 15 |   |   |   |   |   |   |   |   |   |   | 4
    -----------------------------------------
 16 |   |   |   |   |   |   |   |   |   |   | 3
    -----------------------------------------
 17 |   |   |   |   |   |   |   |   |   |   | 2
    -----------------------------------------
 18 |   |   |   |   |   |   |   |   |   |   | 1
    -----------------------------------------
 19 |   |   |   |   |   |   |   |   |   |   | 0
    -----------------------------------------
      9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0
    -----------------------------------------
                    Player two
    -----------------------------------------

Example 2: "Wrong" setting:

4|10
    -----------------------------------------
                    Player two
    -----------------------------------------
      0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
    -----------------------------------------
  0 |   |   |   |   |   |   |   |   |   |   | 19
    -----------------------------------------
  1 |   |   |   |   |   |   |   |   |   |   | 18
    -----------------------------------------
  2 |   |   |   |   |   |   |   |   |   |   | 17
    -----------------------------------------
  3 |   |   |   |   |   |   |   |   |   |   | 16
    -----------------------------------------
  4 |   |   |   |   |   |   |   |   |   |   | 15
    -----------------------------------------
  5 |   |   |   |   |   |   |   |   |   |   | 14
    -----------------------------------------
  6 |   |   |   |   |   |   |   |   |   |   | 13
    -----------------------------------------
  7 |   |   |   |   |   |   |   |   |   |   | 12
    -----------------------------------------
  8 |   |   |   |   |   | A |   |   |   |   | 11
    -----------------------------------------
  9 |   |   |   |   |   | A |   |   |   |   | 10
    -----------------------------------------
 10 |   |   |   |   |   |   |   |   |   |   | 9
    -----------------------------------------
 11 |   |   |   |   |   |   |   |   |   |   | 8
    -----------------------------------------
 12 |   |   |   |   |   |   |   |   |   |   | 7
    -----------------------------------------
 13 |   |   |   |   |   |   |   |   |   |   | 6
    -----------------------------------------
 14 |   |   |   |   |   |   |   |   |   |   | 5
    -----------------------------------------
 15 |   |   |   |   |   |   |   |   |   |   | 4
    -----------------------------------------
 16 |   |   |   |   |   |   |   |   |   |   | 3
    -----------------------------------------
 17 |   |   |   |   |   |   |   |   |   |   | 2
    -----------------------------------------
 18 |   |   |   |   |   |   |   |   |   |   | 1
    -----------------------------------------
 19 |   |   |   |   |   |   |   |   |   |   | 0
    -----------------------------------------
      9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0
    -----------------------------------------
                    Player one
    -----------------------------------------
6|10
    -----------------------------------------
                    Player two
    -----------------------------------------
      0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
    -----------------------------------------
  0 |   |   |   |   |   |   |   |   |   |   | 19
    -----------------------------------------
  1 |   |   |   |   |   |   |   |   |   |   | 18
    -----------------------------------------
  2 |   |   |   |   |   |   |   |   |   |   | 17
    -----------------------------------------
  3 |   |   |   |   |   |   |   |   |   |   | 16
    -----------------------------------------
  4 |   |   |   |   |   |   |   |   |   |   | 15
    -----------------------------------------
  5 |   |   |   |   |   |   |   |   |   |   | 14
    -----------------------------------------
  6 |   |   |   |   |   |   |   |   |   |   | 13
    -----------------------------------------
  7 |   |   |   | B |   |   |   |   |   |   | 12
    -----------------------------------------
  8 |   |   |   | B |   | A |   |   |   |   | 11
    -----------------------------------------
  9 |   |   |   | B |   | A |   |   |   |   | 10
    -----------------------------------------
 10 |   |   |   |   |   |   |   |   |   |   | 9
    -----------------------------------------
 11 |   |   |   |   |   |   |   |   |   |   | 8
    -----------------------------------------
 12 |   |   |   |   |   |   |   |   |   |   | 7
    -----------------------------------------
 13 |   |   |   |   |   |   |   |   |   |   | 6
    -----------------------------------------
 14 |   |   |   |   |   |   |   |   |   |   | 5
    -----------------------------------------
 15 |   |   |   |   |   |   |   |   |   |   | 4
    -----------------------------------------
 16 |   |   |   |   |   |   |   |   |   |   | 3
    -----------------------------------------
 17 |   |   |   |   |   |   |   |   |   |   | 2
    -----------------------------------------
 18 |   |   |   |   |   |   |   |   |   |   | 1
    -----------------------------------------
 19 |   |   |   |   |   |   |   |   |   |   | 0
    -----------------------------------------
      9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0
    -----------------------------------------
                    Player one
    -----------------------------------------
9|10
    -----------------------------------------
                    Player two
    -----------------------------------------
      0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
    -----------------------------------------
  0 |   |   |   |   |   |   |   |   |   |   | 19
    -----------------------------------------
  1 |   |   |   |   |   |   |   |   |   |   | 18
    -----------------------------------------
  2 |   |   |   |   |   |   |   |   |   |   | 17
    -----------------------------------------
  3 |   |   |   |   |   |   |   |   |   |   | 16
    -----------------------------------------
  4 |   |   |   |   |   |   |   |   |   |   | 15
    -----------------------------------------
  5 | C |   |   |   |   |   |   |   |   |   | 14
    -----------------------------------------
  6 | C |   |   |   |   |   |   |   |   |   | 13
    -----------------------------------------
  7 | C |   |   | B |   |   |   |   |   |   | 12
    -----------------------------------------
  8 | C |   |   | B |   | A |   |   |   |   | 11
    -----------------------------------------
  9 | C |   |   | B |   | A |   |   |   |   | 10
    -----------------------------------------
 10 |   |   |   |   |   |   |   |   |   |   | 9
    -----------------------------------------
 11 |   |   |   |   |   |   |   |   |   |   | 8
    -----------------------------------------
 12 |   |   |   |   |   |   |   |   |   |   | 7
    -----------------------------------------
 13 |   |   |   |   |   |   |   |   |   |   | 6
    -----------------------------------------
 14 |   |   |   |   |   |   |   |   |   |   | 5
    -----------------------------------------
 15 |   |   |   |   |   |   |   |   |   |   | 4
    -----------------------------------------
 16 |   |   |   |   |   |   |   |   |   |   | 3
    -----------------------------------------
 17 |   |   |   |   |   |   |   |   |   |   | 2
    -----------------------------------------
 18 |   |   |   |   |   |   |   |   |   |   | 1
    -----------------------------------------
 19 |   |   |   |   |   |   |   |   |   |   | 0
    -----------------------------------------
      9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0
    -----------------------------------------
                    Player one
    -----------------------------------------
7|10
    -----------------------------------------
                    Player two
    -----------------------------------------
      0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
    -----------------------------------------
  0 |   |   |   |   |   |   |   |   |   |   | 19
    -----------------------------------------
  1 |   |   |   |   |   |   |   |   |   |   | 18
    -----------------------------------------
  2 |   |   |   |   |   |   |   |   |   |   | 17
    -----------------------------------------
  3 |   |   |   |   |   |   |   |   |   |   | 16
    -----------------------------------------
  4 |   |   |   |   |   |   |   |   |   |   | 15
    -----------------------------------------
  5 | C |   |   |   |   |   |   |   |   |   | 14
    -----------------------------------------
  6 | C |   | D |   |   |   |   |   |   |   | 13
    -----------------------------------------
  7 | C |   | D | B |   |   |   |   |   |   | 12
    -----------------------------------------
  8 | C |   | D | B |   | A |   |   |   |   | 11
    -----------------------------------------
  9 | C |   | D | B |   | A |   |   |   |   | 10
    -----------------------------------------
 10 |   |   |   |   |   |   |   |   |   |   | 9
    -----------------------------------------
 11 |   |   |   |   |   |   |   |   |   |   | 8
    -----------------------------------------
 12 |   |   |   |   |   |   |   |   |   |   | 7
    -----------------------------------------
 13 |   |   |   |   |   |   |   |   |   |   | 6
    -----------------------------------------
 14 |   |   |   |   |   |   |   |   |   |   | 5
    -----------------------------------------
 15 |   |   |   |   |   |   |   |   |   |   | 4
    -----------------------------------------
 16 |   |   |   |   |   |   |   |   |   |   | 3
    -----------------------------------------
 17 |   |   |   |   |   |   |   |   |   |   | 2
    -----------------------------------------
 18 |   |   |   |   |   |   |   |   |   |   | 1
    -----------------------------------------
 19 |   |   |   |   |   |   |   |   |   |   | 0
    -----------------------------------------
      9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0
    -----------------------------------------
                    Player one
    -----------------------------------------
5|10
    -----------------------------------------
                    Player two
    -----------------------------------------
      0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
    -----------------------------------------
  0 |   |   |   |   |   |   |   |   |   |   | 19
    -----------------------------------------
  1 |   |   |   |   |   |   |   |   |   |   | 18
    -----------------------------------------
  2 |   |   |   |   |   |   |   |   |   |   | 17
    -----------------------------------------
  3 |   |   |   |   |   |   |   |   |   |   | 16
    -----------------------------------------
  4 |   |   |   |   |   |   |   |   |   |   | 15
    -----------------------------------------
  5 | C |   |   |   |   |   |   |   |   |   | 14
    -----------------------------------------
  6 | C |   | D |   |   |   |   |   |   |   | 13
    -----------------------------------------
  7 | C |   | D | B | E |   |   |   |   |   | 12
    -----------------------------------------
  8 | C |   | D | B | E | A |   |   |   |   | 11
    -----------------------------------------
  9 | C |   | D | B | E | A |   |   |   |   | 10
    -----------------------------------------
 10 |   |   |   |   |   |   |   |   |   |   | 9
    -----------------------------------------
 11 |   |   |   |   |   |   |   |   |   |   | 8
    -----------------------------------------
 12 |   |   |   |   |   |   |   |   |   |   | 7
    -----------------------------------------
 13 |   |   |   |   |   |   |   |   |   |   | 6
    -----------------------------------------
 14 |   |   |   |   |   |   |   |   |   |   | 5
    -----------------------------------------
 15 |   |   |   |   |   |   |   |   |   |   | 4
    -----------------------------------------
 16 |   |   |   |   |   |   |   |   |   |   | 3
    -----------------------------------------
 17 |   |   |   |   |   |   |   |   |   |   | 2
    -----------------------------------------
 18 |   |   |   |   |   |   |   |   |   |   | 1
    -----------------------------------------
 19 |   |   |   |   |   |   |   |   |   |   | 0
    -----------------------------------------
      9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0
    -----------------------------------------
                    Player one
    -----------------------------------------
5|19
    -----------------------------------------
                    Player one
    -----------------------------------------
      0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
    -----------------------------------------
  0 |   |   |   |   |   |   |   |   |   |   | 19
    -----------------------------------------
  1 |   |   |   |   |   |   |   |   |   |   | 18
    -----------------------------------------
  2 |   |   |   |   |   |   |   |   |   |   | 17
    -----------------------------------------
  3 |   |   |   |   |   |   |   |   |   |   | 16
    -----------------------------------------
  4 |   |   |   |   |   |   |   |   |   |   | 15
    -----------------------------------------
  5 |   |   |   |   |   |   |   |   |   |   | 14
    -----------------------------------------
  6 |   |   |   |   |   |   |   |   |   |   | 13
    -----------------------------------------
  7 |   |   |   |   |   |   |   |   |   |   | 12
    -----------------------------------------
  8 |   |   |   |   |   |   |   |   |   |   | 11
    -----------------------------------------
  9 |   |   |   |   |   |   |   |   |   |   | 10
    -----------------------------------------
 10 |   |   |   |   | A | E | B | D |   | C | 9
    -----------------------------------------
 11 |   |   |   |   | A | E | B | D |   | C | 8
    -----------------------------------------
 12 |   |   |   |   |   | E | B | D |   | C | 7
    -----------------------------------------
 13 |   |   |   |   |   |   |   | D |   | C | 6
    -----------------------------------------
 14 |   |   |   |   |   |   |   |   |   | C | 5
    -----------------------------------------
 15 |   |   |   |   |   |   |   |   |   |   | 4
    -----------------------------------------
 16 |   |   |   |   |   |   |   |   |   |   | 3
    -----------------------------------------
 17 |   |   |   |   |   |   |   |   |   |   | 2
    -----------------------------------------
 18 |   |   |   |   |   | F |   |   |   |   | 1
    -----------------------------------------
 19 |   |   |   |   |   | F |   |   |   |   | 0
    -----------------------------------------
      9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0
    -----------------------------------------
                    Player two
    -----------------------------------------
3|19
    -----------------------------------------
                    Player one
    -----------------------------------------
      0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
    -----------------------------------------
  0 |   |   |   |   |   |   |   |   |   |   | 19
    -----------------------------------------
  1 |   |   |   |   |   |   |   |   |   |   | 18
    -----------------------------------------
  2 |   |   |   |   |   |   |   |   |   |   | 17
    -----------------------------------------
  3 |   |   |   |   |   |   |   |   |   |   | 16
    -----------------------------------------
  4 |   |   |   |   |   |   |   |   |   |   | 15
    -----------------------------------------
  5 |   |   |   |   |   |   |   |   |   |   | 14
    -----------------------------------------
  6 |   |   |   |   |   |   |   |   |   |   | 13
    -----------------------------------------
  7 |   |   |   |   |   |   |   |   |   |   | 12
    -----------------------------------------
  8 |   |   |   |   |   |   |   |   |   |   | 11
    -----------------------------------------
  9 |   |   |   |   |   |   |   |   |   |   | 10
    -----------------------------------------
 10 |   |   |   |   | A | E | B | D |   | C | 9
    -----------------------------------------
 11 |   |   |   |   | A | E | B | D |   | C | 8
    -----------------------------------------
 12 |   |   |   |   |   | E | B | D |   | C | 7
    -----------------------------------------
 13 |   |   |   |   |   |   |   | D |   | C | 6
    -----------------------------------------
 14 |   |   |   |   |   |   |   |   |   | C | 5
    -----------------------------------------
 15 |   |   |   |   |   |   |   |   |   |   | 4
    -----------------------------------------
 16 |   |   |   |   |   |   |   |   |   |   | 3
    -----------------------------------------
 17 |   |   |   | G |   |   |   |   |   |   | 2
    -----------------------------------------
 18 |   |   |   | G |   | F |   |   |   |   | 1
    -----------------------------------------
 19 |   |   |   | G |   | F |   |   |   |   | 0
    -----------------------------------------
      9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0
    -----------------------------------------
                    Player two
    -----------------------------------------
1|19
    -----------------------------------------
                    Player one
    -----------------------------------------
      0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
    -----------------------------------------
  0 |   |   |   |   |   |   |   |   |   |   | 19
    -----------------------------------------
  1 |   |   |   |   |   |   |   |   |   |   | 18
    -----------------------------------------
  2 |   |   |   |   |   |   |   |   |   |   | 17
    -----------------------------------------
  3 |   |   |   |   |   |   |   |   |   |   | 16
    -----------------------------------------
  4 |   |   |   |   |   |   |   |   |   |   | 15
    -----------------------------------------
  5 |   |   |   |   |   |   |   |   |   |   | 14
    -----------------------------------------
  6 |   |   |   |   |   |   |   |   |   |   | 13
    -----------------------------------------
  7 |   |   |   |   |   |   |   |   |   |   | 12
    -----------------------------------------
  8 |   |   |   |   |   |   |   |   |   |   | 11
    -----------------------------------------
  9 |   |   |   |   |   |   |   |   |   |   | 10
    -----------------------------------------
 10 |   |   |   |   | A | E | B | D |   | C | 9
    -----------------------------------------
 11 |   |   |   |   | A | E | B | D |   | C | 8
    -----------------------------------------
 12 |   |   |   |   |   | E | B | D |   | C | 7
    -----------------------------------------
 13 |   |   |   |   |   |   |   | D |   | C | 6
    -----------------------------------------
 14 |   |   |   |   |   |   |   |   |   | C | 5
    -----------------------------------------
 15 |   | H |   |   |   |   |   |   |   |   | 4
    -----------------------------------------
 16 |   | H |   |   |   |   |   |   |   |   | 3
    -----------------------------------------
 17 |   | H |   | G |   |   |   |   |   |   | 2
    -----------------------------------------
 18 |   | H |   | G |   | F |   |   |   |   | 1
    -----------------------------------------
 19 |   | H |   | G |   | F |   |   |   |   | 0
    -----------------------------------------
      9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0
    -----------------------------------------
                    Player two
    -----------------------------------------
2|19
    -----------------------------------------
                    Player one
    -----------------------------------------
      0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
    -----------------------------------------
  0 |   |   |   |   |   |   |   |   |   |   | 19
    -----------------------------------------
  1 |   |   |   |   |   |   |   |   |   |   | 18
    -----------------------------------------
  2 |   |   |   |   |   |   |   |   |   |   | 17
    -----------------------------------------
  3 |   |   |   |   |   |   |   |   |   |   | 16
    -----------------------------------------
  4 |   |   |   |   |   |   |   |   |   |   | 15
    -----------------------------------------
  5 |   |   |   |   |   |   |   |   |   |   | 14
    -----------------------------------------
  6 |   |   |   |   |   |   |   |   |   |   | 13
    -----------------------------------------
  7 |   |   |   |   |   |   |   |   |   |   | 12
    -----------------------------------------
  8 |   |   |   |   |   |   |   |   |   |   | 11
    -----------------------------------------
  9 |   |   |   |   |   |   |   |   |   |   | 10
    -----------------------------------------
 10 |   |   |   |   | A | E | B | D |   | C | 9
    -----------------------------------------
 11 |   |   |   |   | A | E | B | D |   | C | 8
    -----------------------------------------
 12 |   |   |   |   |   | E | B | D |   | C | 7
    -----------------------------------------
 13 |   |   |   |   |   |   |   | D |   | C | 6
    -----------------------------------------
 14 |   |   |   |   |   |   |   |   |   | C | 5
    -----------------------------------------
 15 |   | H |   |   |   |   |   |   |   |   | 4
    -----------------------------------------
 16 |   | H | I |   |   |   |   |   |   |   | 3
    -----------------------------------------
 17 |   | H | I | G |   |   |   |   |   |   | 2
    -----------------------------------------
 18 |   | H | I | G |   | F |   |   |   |   | 1
    -----------------------------------------
 19 |   | H | I | G |   | F |   |   |   |   | 0
    -----------------------------------------
      9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0
    -----------------------------------------
                    Player two
    -----------------------------------------
4|19
    -----------------------------------------
                    Player one
    -----------------------------------------
      0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
    -----------------------------------------
  0 |   |   |   |   |   |   |   |   |   |   | 19
    -----------------------------------------
  1 |   |   |   |   |   |   |   |   |   |   | 18
    -----------------------------------------
  2 |   |   |   |   |   |   |   |   |   |   | 17
    -----------------------------------------
  3 |   |   |   |   |   |   |   |   |   |   | 16
    -----------------------------------------
  4 |   |   |   |   |   |   |   |   |   |   | 15
    -----------------------------------------
  5 |   |   |   |   |   |   |   |   |   |   | 14
    -----------------------------------------
  6 |   |   |   |   |   |   |   |   |   |   | 13
    -----------------------------------------
  7 |   |   |   |   |   |   |   |   |   |   | 12
    -----------------------------------------
  8 |   |   |   |   |   |   |   |   |   |   | 11
    -----------------------------------------
  9 |   |   |   |   |   |   |   |   |   |   | 10
    -----------------------------------------
 10 |   |   |   |   | A | E | B | D |   | C | 9
    -----------------------------------------
 11 |   |   |   |   | A | E | B | D |   | C | 8
    -----------------------------------------
 12 |   |   |   |   |   | E | B | D |   | C | 7
    -----------------------------------------
 13 |   |   |   |   |   |   |   | D |   | C | 6
    -----------------------------------------
 14 |   |   |   |   |   |   |   |   |   | C | 5
    -----------------------------------------
 15 |   | H |   |   |   |   |   |   |   |   | 4
    -----------------------------------------
 16 |   | H | I |   |   |   |   |   |   |   | 3
    -----------------------------------------
 17 |   | H | I | G | J |   |   |   |   |   | 2
    -----------------------------------------
 18 |   | H | I | G | J | F |   |   |   |   | 1
    -----------------------------------------
 19 |   | H | I | G | J | F |   |   |   |   | 0
    -----------------------------------------
      9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0
    -----------------------------------------
                    Player two
    -----------------------------------------

There are 2 solutions to this problem:

  1. The Server is sending a Invalid Position back to the client when ever the client tries to place something above 10.
  2. The Server is fixing the issue with the following fix:
a_Y = (a_Y > g_BoardWidth)? a_Y - g_BoardWidth : a_y;

In the function:

ECollision BattleShipsGame::PlaceShip(EPlayer a_Player, EShip a_Ship, uint32_t a_X, uint32_t a_Y, EDirection a_Direction)
{
	AssertMessage(nullptr != m_Board, "Attempt to place a ship without a valid board!");
	AssertMessage(!m_PlacementDone[static_cast<uint32_t>(a_Player)], "Attempt to place a ship while the player finalized ship placement already!");
	AssertMessage(a_X < g_BoardWidth && a_Y < g_BoardHeight << 2, "Attempt to place a ship on an invalid position!");
	ECollision collision = ECollision_None;
	if (EPlayer_Two == a_Player)
	{
		// for player two, turn the board upside-down (flip x and y coordinate and direction)
        a_Y = (a_Y > g_BoardWidth)? a_Y - g_BoardWidth : a_y;
		collision = m_Board->AddShip(a_Player, a_Ship, FlipX(a_X), FlipY(a_Y), FlipDirection(a_Direction));
	}
	else if (EPlayer_One == a_Player)
	{
		// for player one, keep the board as is
        a_Y = (a_Y > g_BoardWidth)? a_Y - g_BoardWidth : a_y;
		collision = m_Board->AddShip(a_Player, a_Ship, a_X, a_Y, a_Direction);
	}
	return collision;	
}

This approach is tested and would work. The question is more if it is the responsibility of the Server to correct the data or if it is more the responsibility of the client to provide the correct data. This is something the Server Author has to decide.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant