Commit graph

17 commits

Author SHA1 Message Date
Stephen Seo 74ca3fd696 Add GPL3 Licence headers to sources 2022-04-06 20:49:54 +09:00
Stephen Seo 839e9021fa Refactor: Replace calling JS settimeout with Rust
web-sys and js-sys provides ways to use "settimeout" in pure Rust which
is used instead of calling into Javascript to do "settimeout".
2022-03-23 16:56:25 +09:00
Stephen Seo ebf0cb5bb8 Impl async delay on AI choice
This commit is also a stepping-stone towards handling http requests
which will require deferred callbacks on Yew Components. By figuring
out how to delay callbacks in this commit, it should be easier to
figure out how to handle http requests that may require a deferred
callback.
2022-03-15 13:16:09 +09:00
Stephen Seo b902b1c7b4 Impl use of win/draw check, fixes
Also added unit tests for win/draw checks.
2022-03-09 17:29:53 +09:00
Stephen Seo 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
Stephen Seo 872fb87313 Minor formatting fix 2022-03-07 13:15:53 +09:00
Stephen Seo 2e58bc1288 Set up API for AI choice of slot on board 2022-03-07 13:12:05 +09:00
Stephen Seo 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
Stephen Seo 15c7dc7654 Reorganize front-end source into modules 2022-03-02 15:18:21 +09:00
Stephen Seo 6316bd2fdc Removed unnecessary debug logs
Also removed unnecessary feature from web-sys dependency.
2022-03-01 16:09:20 +09:00
Stephen Seo 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
Stephen Seo 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
Stephen Seo 32a007cf37 Minor fix to front-end 2022-02-28 16:55:07 +09:00
Stephen Seo dd59bdb5f3 "cargo clippy" (linter) fixes 2022-02-28 16:53:13 +09:00
Stephen Seo 0bedc34ac3 "cargo fmt" on front-end code 2022-02-28 16:50:00 +09:00
Stephen Seo cd9f7446a4 Impl basic MVP of front-end
(MVP is Minimum Viable Product.)
Enough is implemented to view a 7x8 board and click on the tiles in the
board to change their states.
2022-02-28 16:45:33 +09:00
Stephen Seo a5ec28bbb1 Add front_end skeleton project 2022-02-28 13:49:40 +09:00