erikamaker / war-paint

Terminal turf-tagging game.
The Unlicense
0 stars 0 forks source link

Iteration 2 #18

Open erikamaker opened 1 year ago

erikamaker commented 1 year ago

Iteration 2

erikamaker commented 1 year ago

I took care of most of the tasks on this list! I still have to make the CPU's cell turn blue (currently it's also red), and I have an idea on how to implement that. I'll be testing it tomorrow when I have a free moment.

Hope you're having a good week 😄

erikamaker commented 1 year ago

On Sunday, I tried to get the CPU squares to turn blue. I merged the methods that I used (to show which agent was coloring a cell, whether player or cpu), but didn't implement the solution yet.

In my comments on that merge, I explained what I tried and where it went wrong, as well as my thoughts on why it went wrong. I'd love your input 😄 I kept the @agent setting / getting methods to show my thought process.

EDIT: I'm wondering now if it's because I'm not changing the state of individual @cells, but rather the whole @board? Should I have focused on changing the individual @cells based on what the @board is reading as the current @agent?

ianterrell commented 1 year ago

Hey! Sorry for delays, I've had a lot going on with kids lately. :)

In my comments on that merge

Try leaving PRs open for discussion! Especially if it's not doing exactly what you want. On a professional team software project the workflow looks something like this:

  1. Decide what to work on (issues, tickets, etc)
  2. Develop locally on your machine on a new branch
  3. Regularly push to a remote branch (GitHub)
  4. Repeat steps 2&3 until you are happy
  5. Open a PR, solicit feedback
  6. Get feedback and discuss it within the PR
  7. Repeat steps 2-6 until the team is happy
  8. then click the merge button

The PR is only really useful if you use it as a place to discuss and solicit feedback before things hit main. If it's going straight to main, you don't even really need a new branch.

Okay, so, catching up...

EDIT: I'm wondering now if it's because I'm not changing the state of individual @cells, but rather the whole @board? Should I have focused on changing the individual @cells based on what the @board is reading as the current @agent?

Yes, you've got it. If we only store something at the level of the board then we can't "remember" what happened with each cell. I think in the prior thread I tried to suggest using @painted_by rather than @painted within the cells. Then each cell knows who painted it, and the renderer can use that information to pick the color.

But you're right with something at the board level — whose turn it is is gameplay state, not rendering state, so the board should track that somehow.

I've put up a PR and added commentary to it! Feel free to peruse it or ignore it and keep on with your own strategies. :)

https://user-images.githubusercontent.com/54963/235458219-850691b7-1228-4a7b-aa28-6e7ed5663714.mov

erikamaker commented 1 year ago

Hey! Sorry for delays, I've had a lot going on with kids lately. :)

No worries at all! The territory I'm taking over at work is a mess right now, so my brain feels like TV static by the end of the day. I'm a little delayed right now too.

The PR is only really useful if you use it as a place to discuss and solicit feedback before things hit main. If it's going straight to main, you don't even really need a new branch.

Of course. The task and commit flow is still a little foreign to me. I'll work on keeping the communication during the experimentation process open, rather than shooting first and asking questions later 😆

I commented on your pull request:

...

So, we consolidate @selected[0] and @selected[1] into a single parameter, @selected, to help make it easier to read. Maybe something like this?

class BoardIndex
  attr_accessor :row, :col
  def initialize(row, col)
    @row = row
    @col = col
  end
end

@selected = BoardIndex.new(2, 3)

Let me know what you think and I'll add that? In the meantime, I'm going to do a refresh and read the whole program line-by-line with the latest changes. Just to make sure I'm keeping the moving parts straight in my head.

I'm going to check off the last item on our Iteration 2 though! What do you think comes next?

erikamaker commented 1 year ago

Hey hey! I'm just curious if you still wanted to work on this together? I'm happy to take over until it's finished if you prefer!

I don't want you to feel overwhelmed to teach me-- I'm still learning on my own! And everything you've exposed me to so far has been super valuable.

ianterrell commented 1 year ago

Hi! Sorry, I've been super super busy lately with family, work, and a few personal projects. How about I bow out for now but please contact me if I can help with anything specific!

erikamaker commented 1 year ago

Hi! Sorry, I've been super super busy lately with family, work, and a few personal projects. How about I bow out for now, but please contact me if I can help with anything specific!

Hey! That is okay! I'm really sorry I didn't say anything back. I didn't want to bother you since you said you were swamped lately. Real quick, though: I wanted to thank you for practicing collaborative coding with me a few months ago.

With that invaluable experience, my personal projects, more studying, and a few good interviews-- I managed to score my first job! I've been writing new / refactoring old apps for a manufacturing company. I work mostly in C#. It's been an absolute dream, and I have been getting consistent good reviews of my work since I started.

That said, I have been so busy that I kinda stopped working on command line projects to focus on new areas of study for work. I'm in the planning stages for remaking my text adventure game engine in Dart to make a mobile Flutter app right now, though.

So: thank you! It meant a whole tangible lot that you reached out on Reddit that day.

Hope you've been well too 😊

ianterrell commented 1 year ago

That's wonderful to hear! Very many congratulations on the job! It sounds great and I'm happy for you. I'm sure you'll keep growing in that job and who knows what awesome things will come next!

(I'm well! I've actually restarted an online masters program that I started in 2020 and dropped with the pandemic. Maybe I'll see you there before long!)

Congrats again!