Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

roguelike impl done #6

Open
wants to merge 69 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
518fe10
task 1 done
simiyutin Mar 4, 2017
14c5beb
more comments
simiyutin Mar 6, 2017
436381a
Create README.md
simiyutin Mar 6, 2017
12f41aa
Update README.md
simiyutin Mar 7, 2017
ac8f8cb
exceptions
simiyutin Mar 7, 2017
e0006bf
Merge branch 'dev' of github.com:simiyutin/au_software_design into dev
simiyutin Mar 7, 2017
bae7b44
Update README.md
simiyutin Mar 7, 2017
cf1f13b
Update README.md
simiyutin Mar 7, 2017
87259a6
grep command added
simiyutin Mar 8, 2017
209ea7f
tests
simiyutin Mar 11, 2017
57caaa3
comments
simiyutin Mar 11, 2017
2dcc535
Update README.md
simiyutin Mar 11, 2017
26a5078
fixes
simiyutin Mar 11, 2017
1879ced
reversed domain name packages
simiyutin Mar 11, 2017
9541039
.gradle folder removed
simiyutin Mar 11, 2017
db4f811
Merge branch 'dev' of github.com:simiyutin/au_software_design into dev
simiyutin Mar 11, 2017
d895b9a
Merge branch 'dev' into grep
simiyutin Mar 11, 2017
1d8d00a
post merge fix
simiyutin Mar 11, 2017
5f68b21
Merge branch 'grep' of github.com:simiyutin/au_software_design into grep
simiyutin Mar 11, 2017
dc44b31
book store class diagram
simiyutin Mar 29, 2017
b21a634
minor updatee
simiyutin Mar 31, 2017
eb01c65
gitignore modification
simiyutin Apr 12, 2017
26cb7ed
roguelike arch
simiyutin Apr 12, 2017
e4cdc9e
first stubs
simiyutin May 8, 2017
898333d
first world
simiyutin May 8, 2017
20848c6
randomized world
simiyutin May 8, 2017
69094ae
display player
simiyutin May 8, 2017
35c329a
beings and player
simiyutin May 9, 2017
963710c
mushrooms
simiyutin May 9, 2017
368b3b9
dead screen & health display
simiyutin May 9, 2017
1c0ab95
ai
simiyutin May 10, 2017
a0e49a7
ghosts can feel player
simiyutin May 10, 2017
800423c
ghost actions
simiyutin May 10, 2017
d3715ad
ghost effect
simiyutin May 11, 2017
1a36c59
messages
simiyutin May 11, 2017
bcd7fbf
dummy Weapons
simiyutin May 11, 2017
b5efefb
todo ++
simiyutin May 11, 2017
caa8823
++ todo
simiyutin May 11, 2017
64611a6
dragon dummy
simiyutin May 11, 2017
b3f80e2
pick weapons
simiyutin May 11, 2017
74d19b8
battle
simiyutin May 11, 2017
c8258cf
amend
simiyutin May 11, 2017
0fe3905
med aids
simiyutin May 11, 2017
573040b
slightly tuned
simiyutin May 11, 2017
73e396f
updated todo list
simiyutin May 11, 2017
04e7e22
artefacts fix
simiyutin May 13, 2017
77c016f
minor updates
simiyutin May 13, 2017
104018d
amend
simiyutin May 13, 2017
0b90e56
Z level
simiyutin May 13, 2017
3edc211
level
simiyutin May 13, 2017
f02c56b
random colors on new level
simiyutin May 13, 2017
217eebe
refactor
simiyutin May 13, 2017
329c0a2
reverse domain name
simiyutin May 13, 2017
1bcf168
refactor
simiyutin May 13, 2017
27f9307
tests
simiyutin May 13, 2017
a30e763
logging
simiyutin May 13, 2017
7c2383e
fix
simiyutin May 13, 2017
c8d3450
building fix
simiyutin May 13, 2017
5bb68c9
more logging + refactor
simiyutin May 13, 2017
2a82807
++
simiyutin May 14, 2017
01b8460
Create README.md
simiyutin May 14, 2017
5d32448
Update README.md
simiyutin May 14, 2017
edfb7e9
inventory
simiyutin May 27, 2017
49e99a8
Merge branch 'roguelike_impl' of github.com:simiyutin/au_software_des…
simiyutin May 27, 2017
4251b1a
Update README.md
simiyutin May 27, 2017
9e0f6c7
trash code removed
simiyutin May 27, 2017
384925c
Merge branch 'roguelike_impl' of github.com:simiyutin/au_software_des…
simiyutin May 27, 2017
99ed175
comments
simiyutin May 28, 2017
784f155
weapon loop improved
simiyutin May 28, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
/**/.idea/
/**/build
/**/*.vpp.*
/**/*.iml
/**/*.class
/**/target/
44 changes: 44 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# au_software_design

##1. Shell

###Command line utility similar to Unix shell.

####Supported features:

* echo command
* cat command
* wc command
* exit command
* pwd command
* environment variables
* unknown commands are passed to system shell as separate process through Java.Process library.

####Class diagram:
![shell class diagram](https://www.gliffy.com/go/share/image/smx5dub0j39jxied850w.png?utm_medium=live-embed&utm_source=custom)

####Data flow:
* Main: run Shell object.
* Shell: Read line from System.in.

* Preprocessor: Substitute environment variables in input string. E. g. "Hello, $name" -> "Hello, Alex"
* Tokeniser: Split string into a list of tokens: words and operators.
* Parser: Parse list of tokens as sequence of commands divided by pipes.
* Command Executor: Perform chained computation passing output of one comand as input to the next one.
* Pass result to System.in and loop again.


##2. Grep
###Command similar to UNIX grep utility.

####Supports:
* Reading from standard input or from file.
* Parameters:
* -i: case insensivity.
* -w: whole words search.
* -A %number%: Number of lines to add to output after each matched line.

####Implementation:
* For regular expressions java.util.regex package is used.

* For parsing command line arguments Apache Commons CLI library was chosen, because it is pretty easy to use and fits our requirements very well. Other libraries like JCommander and args4j were considered as an option, but were rejected as a little overkill at this point. If number of arguments will grow seriously, it may be reasonable to switch to one of these libraries, because of usage of annotations for introducing parameters.
Binary file added book_store/book_store_class_diagram.vpp
Binary file not shown.
705 changes: 705 additions & 0 deletions roguelike/arch/roguelike_class.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added roguelike/arch/roguelike_class_diagram.vpp
Binary file not shown.
183 changes: 183 additions & 0 deletions roguelike/arch/roguelike_component.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions roguelike/impl/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
## ROGUELIKE
### Управление
1. Передвижение: клавиши A, W, S, D
2. В стенах можно копать ходы - для этого надо стоя рядом с ней шагнуть в ее сторону еще раз и нажать [enter]
3. Смена оружия: клавиша I
### Мобы
1. Гриб (M): Статический моб, отравляет территорию вокруг себя.
2. Призрак (G): Когда оказывается рядом с игроком, начинает за ним гнаться, и если догоняет, то инвертирует клавиши управления и начинает убегать. Если после этого игрок догоняет призрака, то призрак исчезает и управление возвращается к исходному.
3. Дракон (D): Случайно блуждает по карте, поджигая за собой пол. Можно сразиться с драконом, встав рядом, и зажав [enter], и получить от него оружие более высокого уровня (но это не точно). После победы над всеми драконами на уровне открывается переход на новый уровень (Z), который надо найти на карте.
### Предметы
По карте разбросаны:
* Аптечки
* Оружие
### Уровни
Каждый новый уровень отличается от предыдущего количеством урона, которое игрок наносит драконам или получает при схватках и хождении по отравленным или подожженным тайлам. При этом максимальный уровень здоровья и его количество, восстанавливаемое одной аптечкой не изменяются.
Loading