Skip to content

Commit 6400704

Browse files
Update assignments based on week 1 feedback.
1 parent cda546b commit 6400704

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

assignments/battleship_objects/README.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ After completing this assignment, you should...
1616
* Understand when and why methods require parameters
1717
* Understand mappings between simple real-world concepts and their code representation in classes and methods
1818
* Understand how a Ruby application can span more than one file on disk
19-
* Understand simple inheritance
2019

2120
### Performance Objectives
2221

@@ -32,22 +31,21 @@ After completing this assignment, you should be able to effectively...
3231

3332
### Deliverables
3433

35-
* **A Drawing.** Draw your classes, their methods, their instance variables, and their relationships out on a piece of paper. At the conclusion of your work, make sure to give the paper to your instructor.
36-
* **A Repository.** Create your own github repository. Call it `battleship_objects`.
37-
* **A README.** Create a `README.md` file. Describe each of your classes individually in the README. Include a description of each method (behavior) you're giving them. You should start this before writing any code, but it's fine (and good) if you modify it as you code later.
34+
* **A Drawing.** Draw your classes, their methods, their instance variables, and their relationships out on a piece of paper. At the conclusion of your work, make sure to give the paper to your instructor. This is meant to be a creative exercise, so it odes not need to adhere to any particular format. Just use paper as one of your development tools.
35+
* **A Repository.** Fork this repository.
36+
* **A README.** Wipe out this README file and create your own. Describe each of your classes individually in the README. Include a description of each method (behavior) you're giving them. You should start this before writing any code, but it's fine (and good) if you modify it as you code later.
3837
* **Ruby Files Containing Classes.** Create one `.rb` file for each of your classes.
3938
* **One Ruby File Instantiating Objects.** After your classes exist, it will be time to bring them all together. You'll create an additional ruby file called "battleship_objects.rb" and write code in that file that instantiates each of your objects (HINT: this means calling `.new` on each class and passing it the appropriate information).
4039

4140
After you fulfill each requirement below, `git add` and `git commit`. After your work is complete, make sure to `git push` to get your changes up to github. Feel free to push more than once along the way, of course.
4241

43-
Send the link to your repository to your instructor.
42+
Make a pull request when you're done.
4443

4544
### Requirements
4645

4746
* Each class should be in a separate file. If the class is called `Ship`, then the file should be named `ship.rb`.
4847
* Each of your classes should have an initializer. These initializers SHOULD have code in them to set all the instance variables you provided in your diagram.
4948
* All other methods you write for your classes will NOT need to have code in them. You'll just be writing "stubs" for those.
50-
* At least one class should inherit from another class.
5149
* Consider the following behaviors. They will all need to be executed during a game of Battleship. Each of these behaviors will need to be a method, and you have to place them in the appropriate classes. You DO NOT have to write code inside of them. Just give them reasonable names and put them in the right places:
5250
* Start a new game
5351
* Place a ship on the game board
@@ -65,4 +63,4 @@ Meet all requirements given above.
6563

6664
## Hard Mode
6765

68-
Actually implement one method for each of the classes you've written. Then call it in `battleship.rb` in a meaningful way.
66+
Actually implement one method for each of the classes you've written. Then call your implemented methods in the overarching `battleship.rb` in a meaningful way.

assignments/number_guessing/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ After you get each requirement working, run `git add .`, then `git commit -m "TE
3636

3737
After your work is complete, make sure to `git push` to get your changes up to github. Feel free to do this more than once along the way, of course.
3838

39+
Finally, create a pull request for your completed project. This will count as turning in your work.
40+
3941
### Requirements
4042

4143
* The gameplay should match the instructions given in the Mode(s) below.

projects/battleship/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,14 @@ After completing this assignment, you should be able to effectively...
3434
* **Ruby Files.** You'll need a lot of these, and you'll be creating them from scratch. Again, you should have one per class, plus at least one other to be executed from the command line to run the game.
3535
* **A Playable Game.** When I clone your repository, I should be able to run your program and play through an entire game of Battleship. I should be able to win and to lose.
3636

37-
Send the link to your repository to your instructor.
37+
When you are finished, create a pull request.
3838

3939
### Requirements
4040

4141
The major requirement of this project is for the TEST SUITE TO PASS. You are coding to the tests, and ideally, you're making them pass one at a time. As discussed in class, I would suggest making the first test pass USING THE SIMPLEST MEANS POSSIBLE. Then move on to the second test, the third test and so on. You should commit after each test passes.
4242

43+
Just to be clear, your computer player does not have to be smart. It just has to play until the game is finished.
44+
4345
Here's the odd thing. READ THIS. If you're ever going to call `gets.chomp` in your code to prompt the user for his/her input, don't. Put the following code at the top of any file that needs to prompt the user:
4446

4547
```
@@ -50,11 +52,9 @@ end
5052

5153
This goes BEFORE you start defining your class. I know that looks stupid, and I apologize for it, but the test suite will only run if you ALWAYS ask for user input by calling `get_user_input` rather than `gets.chomp`. Sorry again.
5254

53-
Just to be clear, your computer player does not have to be smart. It just has to play until the game is finished.
54-
5555
## Normal Mode
5656

57-
It's finally time. Your task this weekend, whether or not you choose to accept it, is to write a program that plays the game of Battleship. The user will act as Player 1, and the computer will act as Player 2.
57+
It's finally time. Your task this weekend, whether or not you choose to accept it, is to write a program that plays the game of Battleship. The user can act as Player 1, and the computer can act as Player 2. However, as you work through the assignment, you'll notice that you're also building it so that two humans could play each other.
5858

5959
This assignment will bring together two of the assignments from earlier in the week: your written set of computer-friendly instructions from Day 1, and the draft code of your objects from Day 3. You WON'T be using that draft code as a starting point, because it's likely that the classes you designed won't match what the test suite is expecting. You'll be writing code to make a test suite pass, so it is going to dictate a lot of what you put together.
6060

0 commit comments

Comments
 (0)