| Index: client/samples/dartcombat/README
|
| ===================================================================
|
| --- client/samples/dartcombat/README (revision 3705)
|
| +++ client/samples/dartcombat/README (working copy)
|
| @@ -1,36 +0,0 @@
|
| -Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
|
| -for details. All rights reserved. Use of this source code is governed by a
|
| -BSD-style license that can be found in the LICENSE file.
|
| -
|
| -Dartcombat is a sample game which illustrates how to use isolate communication
|
| -and futures.
|
| -
|
| -Building and running:
|
| -
|
| -1. go to the top-level directory of the project:
|
| - $ cd dart/
|
| -
|
| -2. build the dartc compiler:
|
| - $ ./tools/build.py --arch=ia32
|
| -
|
| -3. run the htmlconverter tool, that converts the dart code to javascript:
|
| - $ python ./client/tools/htmlconverter.py \
|
| - client/samples/dartcombat/dartcombat.html -o out/
|
| -
|
| -4. open the generated file in a browser:
|
| - $ google-chrome out/client/samples/dartcombat/dartcombat-js.html
|
| -
|
| -Using dartcombat:
|
| -
|
| -Dartcombat works as follows:
|
| -- screen: The screen shows 4 grids. On the left is what player1 knows (his board
|
| - in detail, and his partial knowledge of player2's board), on the right is what
|
| - player2 knows.
|
| -
|
| -- setup: You can place boats on the top boards by clicking and dragging the
|
| - mouse.
|
| -
|
| -- shooting: You can shoot by clicking on the bottom grids. To highlight isolate
|
| - communication and futures, we made each click a supershoot: if a boat is hit,
|
| - the player will automatically scan all cells around the initial shot, and
|
| - progresively hit the boat and sink it.
|
|
|