timotree3 / Battleship

My first battleship game. Written in python.
GNU General Public License v3.0
1 stars 0 forks source link

Distinguishing player and computer history #6

Open timotree3 opened 8 years ago

timotree3 commented 8 years ago

Currently the only way to tell who did what is the sequence the history is in.

My idea is to color code the history kind-of like this:

for action, color in history:
    print('\033[2K{}{}.'.format(color, action.title()))
timotree3 commented 8 years ago

Turns out color coding looks pretty terrible so I am changing the idea to be split histories on either side for your moves and enemy moves like so:

            Enemy Fleet                    Your Fleet
       ~ ~ ~ ~ ~ ~ ~ ~ ~ ~            ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
       ~ ~ ~ ~ ~ ~ ~ ~ ~ ~            ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
       ~ ~ ~ ~ ~ ~ ~ ~ ~ ~            ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
       ~ ~ ~ ~ ~ ~ ~ ~ ~ ~            ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
       ~ ~ ~ ~ ~ ~ ~ ~ ~ ~            ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
       ~ ~ ~ ~ ~ ~ ~ ~ ~ ~            ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
       ~ ~ ~ ~ ~ ~ ~ ~ ~ ~            ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
       ~ ~ ~ ~ ~ ~ ~ ~ ~ ~            ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
       ~ ~ ~ ~ ~ ~ ~ ~ ~ ~            ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
       ~ ~ ~ ~ ~ ~ ~ ~ ~ ~            ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
Game Started
Place your ship
Examples:  a 0 d | A, 0, Down | 0-a-DOWN
            Your Moves                   Enemy Moves

We'll see how this goes...