Commit graph

109 commits

Author SHA1 Message Date
89a12623b4 Incorporate game AI into game
Can select from three difficulties, and the AI makes their move when it
is their turn. AI probably still needs some tweaking..
2022-03-10 16:17:16 +09:00
e35870b240 Impl placed token indicator, fixes/refactorings 2022-03-10 15:43:03 +09:00
07eee5b0ce Add root README.md 2022-03-09 22:13:53 +09:00
a597b4217a Update front_end/README.md about website 2022-03-09 19:45:11 +09:00
0d3d6b2a8d Fix typo 2022-03-09 19:29:00 +09:00
d4acd7a58f Update Sprint 2 backlog 2022-03-09 18:20:06 +09:00
7e9718a743 Refactorings and linter fixes 2022-03-09 18:14:01 +09:00
76e6d3be52 Impl buttons indicator that won the game 2022-03-09 18:10:13 +09:00
b902b1c7b4 Impl use of win/draw check, fixes
Also added unit tests for win/draw checks.
2022-03-09 17:29:53 +09:00
9e9bb0758c Fix rand not compilable for wasm, impl game logic
"rand" crate was not compilable for wasm-unknown-unknown target, so an
alternative "oorandom" crate was substituted in.

Basic game win/draw detection logic added.
2022-03-09 16:26:14 +09:00
2389441207 Update sprint 2 backlog 2022-03-09 15:31:29 +09:00
21041132c6 Minor fixes/tweaks to Utility AI 2022-03-07 19:50:43 +09:00
14d224734f Minor fix to Utility AI code 2022-03-07 17:07:00 +09:00
ec9aac8400 Tweak Hard-level AI
Shuffles the utilities-index pairs for the cases where there are
multiple pairs of the same utility value.
2022-03-07 16:59:18 +09:00
c960859348 Update Sprint 2 backlog, product backlog 2022-03-07 14:55:41 +09:00
d78c612587 Move "ai/mod.rs" to "ai.rs" (module management) 2022-03-07 14:47:04 +09:00
1936e5ce22 Basic impl. of AI (enough completed to use/test) 2022-03-07 14:45:57 +09:00
ea2625cb48 WIP AI implementation, some fixes/tweaks to AI 2022-03-07 14:35:09 +09:00
93af9c234d WIP Utility based AI, some impl. progress 2022-03-07 14:23:39 +09:00
b2fbd8cdcc Update Sprint 2 backlog 2022-03-07 13:18:11 +09:00
872fb87313 Minor formatting fix 2022-03-07 13:15:53 +09:00
5e2c5b6d41 Minor refactoring
Use "From<>" instead of "Into<>" for MainMenuMessage to GameState.
2022-03-07 13:14:57 +09:00
2e58bc1288 Set up API for AI choice of slot on board 2022-03-07 13:12:05 +09:00
614aae9f54 Create Backlog for Sprint 2 2022-03-06 19:44:21 +09:00
324da009b6 Prepare for Sprint 2 in spreadsheets
Sprint 2 Goal: Utility-based AI impl.
2022-03-06 19:36:55 +09:00
c6e88e31e6 Update backlogs for additional story completed
"Game start" User Story was implemented along side "Main menu".
2022-03-04 16:32:10 +09:00
86396ff330 Update Sprint 1 backlog (day 5) 2022-03-04 16:25:16 +09:00
130cc42d86 Impl main menu
Only "LocalMultiplayer" can be chosen for the game-mode since neither
AI nor Networked-Multiplayer has been implemented yet.
2022-03-04 16:22:30 +09:00
20d9562aa8 Update Sprint 1 Backlog 2022-03-04 14:37:03 +09:00
079bf6229f Impl convenience functions, refactoring 2022-03-03 18:01:46 +09:00
eefa8f5bdc Update spreadsheets for Sprint 1 day 4 2022-03-03 17:39:59 +09:00
462dec9ea1 Remove NodeRef for getter, improve turn indicator
All NodeRefs have been removed in favor of "getElementById".

Turn indicator is now much more obvious to see.
2022-03-03 17:36:51 +09:00
52b841d98a Replace slot "ref" with "id" 2022-03-03 14:08:35 +09:00
582729fc58 Spreadsheets: one task as incomplete/blocked
"Turn logic" marked as incomplete/blocked because it will be reworked
when actual multiplayer is to be implemented.
2022-03-02 19:26:21 +09:00
5390e4f9cf Minor impl: add default messages to info_texts 2022-03-02 19:22:36 +09:00
2fb5a18636 Minor refactoring
Changed the "Msg" type of "Wrapper" from "String" to "WrapperMsg".
2022-03-02 19:19:50 +09:00
3ffeb45de4 Update spreadsheets for Sprint 1 Day 3's progress 2022-03-02 17:58:22 +09:00
3b4d8b3483 Impl additional info text box, drop logic
Can place tokens, and not place tokens where there already is a token.

Additional info text box added to the side of the board.

More information to the UI regarding placed tokens.
2022-03-02 17:51:14 +09:00
4c8e330c05 Fix comment typo 2022-03-02 16:27:19 +09:00
8838dbae69 Cleanup and fixes
Remove state::MessageBus in favor of String messages sent to Wrapper
from Slot.

Update Slot state from inside Wrapper::update such that changes should
be immediately visible per Slot (moved code from Wrapper::rendered,
fixing updates not being immediately visble).
2022-03-02 16:25:01 +09:00
7e82a6e787 Minor fix to usage of html element for info_text 2022-03-02 15:47:43 +09:00
45e2c88745 Reverse info_text vertically
info_text's latest messages now appear at the top instead of at the
bottom.
2022-03-02 15:38:24 +09:00
15c7dc7654 Reorganize front-end source into modules 2022-03-02 15:18:21 +09:00
bef0c60baf Add constraint, tweaks to backlogs/userStories 2022-03-01 20:32:54 +09:00
9f7fcfe48c Update Sprint 1 Backlog
Moved the "skeleton front-end" task to a different User Story.

Minor fix to Product Backlog.
2022-03-01 16:22:49 +09:00
70f938a0e4 Update Sprint 1 Backlog with more info 2022-03-01 16:16:28 +09:00
6316bd2fdc Removed unnecessary debug logs
Also removed unnecessary feature from web-sys dependency.
2022-03-01 16:09:20 +09:00
720c9fdbcb Update Sprint 1 Backlog
Logged work for day 2 of Sprint 1.
2022-03-01 16:07:13 +09:00
a8e516c535 Added output-text-box, connected front-end items
More work was needed to have separate components of the front-end to
communicate with each other. Also added an output-text-box for
informative messages.
2022-03-01 16:02:59 +09:00
a756f0b4b2 Have SharedState use an array of Rc's
Having each array element be an Rc<Cell<BoardState>> enables sharing
Rc's with the Slot subelement.
2022-03-01 11:05:56 +09:00