honestly this is one of the better written specs, but you may beg to differ
oh yeah, you may not even have node js installed, so lemme give you some instructions
nvm is a pretty darn tool thing that allows
you to install node without any fuss
just follow the instructions here and you should have it installed
after that, run this command here: ```bash nvm install node ``` and you should have a cool fresh version of node on your computer!
god windows sucks for development
but regardless, you can just download it here and then
run it like any other windows installer
what the title said.
build the tic tac toe app as described in this link
the awful thing about this assignment is that you have to keep a log of everything you do in a file named `tic-tac-toe.txt`, like what you wrote, what happened, etc.
to give you an idea of what this file might look like, here's the start of mine that got full credit:
INITIAL SETUP
used create-react-app to initialize the directory and install react
following the directions, created `index.js`, `App.js`, and `styles.css` with the template source code initially given
the initial code just rendered a single X, so i duplicated it a lot of times to render an actual tic-tac-toe board
i then did some refactoring by renaming the current component to `Board` and moving the `button`s back to their own component with a prop for their value ```jsx function Square({ value }) { return <button className="square">{value}</button>; } ```
you don't have to write it exactly as i did, or even do what i did in those notes!
the excerpt is just to give you a bit of an idea for what it might look like
now eggert asks you to make some stupid alternate version of tic tac toe called "chorus lapilli"
it's like that game, except for these two things:
if you want an example of an app that got full credit, i actually managed to deploy my work for this assignment to this silly little url
the time travel feature is optional, but i found implementing it to be a pretty fun exercise
unfortunately, you do have to do that stupid lab notebook thing in `chorus-lapilli.txt`
but you don't have to restart from scratch!
i believe you can just say something like "starting off from that tic tac toe project i built..." and that'll work
another thing is, at least for my quarter the notes were worth like 10% of this assignment's grade
so don't stress if you can't write them in time haha
take a gander at
this testing script
it does need selenium,
which you can install with this command here:
```bash
pip install selenium # wow, that was easy
```
but uh yeah, add 3 new tests to the section labelled "ADD YOUR TESTS HERE"
be sure to prefix all your tests with `test_`! for example, one of my testing functions goes something like this ```py def test_redundant_click(self): """Check that clicking a tile twice doesn't change its value.""" pass # testing code goes down here ```
since the seasnet servers don't have browsers, this is one of those rare things that you can't do on seasnet
instead, put the file they gave in the root of your `chorus_lapilli` project or whatever you called it and execute it (`python3` or `./`, either is fine) to test your project!
alright so first you have to make sure all the files in the project are present
i did a `tree` command at the root of my project and got this stuff (excluding `.node_modules`):
```
.
├── chorus-lapilli.txt
├── package.json
├── package-lock.json
├── public
│ ├── favicon.ico
│ ├── index.html
│ ├── logo192.png
│ ├── logo512.png
│ ├── manifest.json
│ └── robots.txt
├── src
│ ├── App.js
│ ├── index.js
│ └── styles.css
├── test_chorus_lapilli.py
└── tic-tac-toe.txt
```
please don't worry if your file structure doesn't match this exactly! just make sure of the following:
then, run this command in the project directory ```bash npm pack ``` it should generate a neatly packaged `.tgz` file- just rename that lil thing `chorus-lapilli.tgz` and you're gtg!