-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Luchao Qi
committed
May 13, 2021
1 parent
ee5b454
commit b073b67
Showing
4 changed files
with
47 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,32 @@ | ||
Python-based spaceship dodging game in terminal using curses (windows-curses), no pygame required. | ||
|
||
> Windows version of Python doesn't come with built-in module `curses`, but you can work around by using `windows-curses` | ||
### Linux | ||
|
||
```bash | ||
# unit test for windows | ||
conda env create -f environment.yml -n spaceship # env name | ||
conda activate spaceship | ||
# run the program | ||
python test.py --canvas_height 30 --canvas_width 30 --diff_level 2 | ||
``` | ||
|
||
demo | ||
|
||
<iframe width="857" height="565" src="https://www.youtube.com/embed/x4g7NjKTjqw" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe> | ||
|
||
### Windows | ||
|
||
```bash | ||
# unit test for windows | ||
conda env create -f environment_win.yml -n spaceship # env name | ||
conda activate spaceship | ||
python test.py | ||
# run the program | ||
python test.py --canvas_height 30 --canvas_width 30 --diff_level 2 | ||
``` | ||
|
||
demo | ||
|
||
![](https://i.loli.net/2021/05/14/i3oxKlQY9mcg74s.gif) | ||
|
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: spaceship | ||
channels: | ||
- defaults | ||
dependencies: | ||
- _libgcc_mutex=0.1=main | ||
- ca-certificates=2021.4.13=h06a4308_1 | ||
- certifi=2020.12.5=py39h06a4308_0 | ||
- ld_impl_linux-64=2.33.1=h53a641e_7 | ||
- libffi=3.3=he6710b0_2 | ||
- libgcc-ng=9.1.0=hdf63c60_0 | ||
- libstdcxx-ng=9.1.0=hdf63c60_0 | ||
- ncurses=6.2=he6710b0_1 | ||
- openssl=1.1.1k=h27cfd23_0 | ||
- pip=21.0.1=py39h06a4308_0 | ||
- python=3.9.4=hdb3f193_0 | ||
- readline=8.1=h27cfd23_0 | ||
- setuptools=52.0.0=py39h06a4308_0 | ||
- sqlite=3.35.4=hdfb4753_0 | ||
- tk=8.6.10=hbc83047_0 | ||
- tzdata=2020f=h52ac0ba_0 | ||
- wheel=0.36.2=pyhd3eb1b0_0 | ||
- xz=5.2.5=h7b6447c_0 | ||
- zlib=1.2.11=h7b6447c_3 | ||
prefix: /home/luchaoqi/miniconda3/envs/spaceship |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters