Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
netcan committed Jun 17, 2020
1 parent 23f7c03 commit 76eac3b
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,50 @@ It need rust nightly version.
$ rustup default nightly
```

### Developing
```
$ sudo apt-get install python3-dev python-dev
$ pip3 install virtualenv ipython
$ cd pymodule
$ virtualenv venv
$ source venv/bin/activate
(venv) $ pip install -r requirements.txt
(venv) $ maturin develop
(venv) $ ipython
In [1]: import animal_chess_pymodule
In [2]: board = animal_chess_pymodule.Board('l5t/1d3c1/r1p1w1e/7/7/7/E1W1P1R/1C3D1/T5L w - - 0 1')
In [3]: board.generate_all_steps()
Out[3]:
[24688,
24673,
24656,
25202,
25187,
25185,
25716,
25701,
25699,
26230,
26198,
26213,
29057,
29042,
29025,
29040,
30085,
30070,
30053,
30068,
32897,
32880,
34422,
34437]
In [4]: board.move_chess(24688)
```

### Play
```
$ git clone https://github.com/netcan/AnimalChess.git
Expand Down

0 comments on commit 76eac3b

Please sign in to comment.