Skip to content
/ cmd_hex Public

A command line based hex game using monte carlo simulation for the computer player

Notifications You must be signed in to change notification settings

LMJW/cmd_hex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

This is a command line based hex game

wiki

The computer player is simulated use monte carlo simulation. You can register blue player or red player in main function.

To compile the program, you can run g++ -std=c++11 -pipe -O2 hex.cc -o hex.

Then you can execute ./hex in command line to run this program.

This is the program interface...

Game started. Press Ctrl+C if you want to quit game
the grid is a 11x11 grid.
The index starts from up left corner with index 0,0, and the down right corner with index 10,10.
You need to enter the index r c seperate with space to place your hex on the grid
. - . - . - . - . - . - . - . - . - . - .
 \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \
  . - . - . - . - . - . - . - . - . - . - .
   \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \
    . - . - . - . - . - . - . - . - . - . - .
     \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \
      . - . - . - . - . - . - . - . - . - . - .
       \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \
        . - . - . - . - . - . - . - . - . - . - .
         \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \
          . - . - . - . - . - . - . - . - . - . - .
           \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \
            . - . - . - . - . - . - . - . - . - . - .
             \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \
              . - . - . - . - . - . - . - . - . - . - .
               \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \
                . - . - . - . - . - . - . - . - . - . - .
                 \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \
                  . - . - . - . - . - . - . - . - . - . - .
                   \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \
                    . - . - . - . - . - . - . - . - . - . - .
Now is Blue player's turn:

About

A command line based hex game using monte carlo simulation for the computer player

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages