OLD | NEW |
| (Empty) |
1 | |
2 This directory contains Html, Javascript, and C++ files to implement the Hex | |
3 Game (with AI) as a NativeClient application. | |
4 | |
5 The hex_12.cpp file is NOT part of the build. This is the original | |
6 AI/application that Cameron Browne posted on the web along with articles on the | |
7 game of Hex. It is provided here as a reference point for hex_maniac.cc. | |
8 hex_manaic.cc is a copy of hex_12.cpp but with the changes necessary to be a | |
9 NativeClient application. | |
10 | |
11 Key changes include: | |
12 - Not using stdin for input, but instead waiting for events to be sent from | |
13 the browser. | |
14 - Not having a main(), but instead having AppMain which is run as a separate | |
15 thread from the main thread that handles messages from the browser and sends | |
16 (posts) messages back. The main thread/Native Client instance is defined in | |
17 hex_instance.h and hex_instance.cc. | |
18 - The output is still there. This is useful in debugging on Linux, because | |
19 if you launch chrome from a terminal, then the text version of the game | |
20 state will be printed to the terminal, as well as other printf/cout | |
21 messages. | |
OLD | NEW |