DEV Community

kealanheena
kealanheena

Posted on • Edited on

Makers Week 3: To Be Frank, I'm Having Fun!

So at the start of this week, we started working on the front end. We were using "erb" and "Sinatra". It's more rewarding to see something visible after putting in some work rather than having to look into the terminal to see if what you've done does anything.

Day 1

This week started with a lot of "erb", we were only using the parts similar to HTML, as well as a bit of "CSS". We were also learned about "HTTP" requests and about routes. There was a lot of info to absorb although I had learned bits and pieces leading up to the course so it wasn't too daunting.

Day 2

We got a bit further through the work on the second day moving onto forms and integrating user input, which was interesting. We were able to take a name off a user and input it to the top of our web page. We also learned how to input something manually using query strings. I got to play around with capybara which is used for testing user input. It was interesting to how that worked and to see how we could use a webpage through "pry".

Day 3

This is where we started our challenge which was a battle simulator, it looked an awful lot like pokemon. So basically it going to be a turn-based game where each player is given a chance to attack. But we have to start by taking player names. which we used a form for we had a lot of problems with this cause we were using shotgun. We later found out that shotgun isn't very compatible with sessions which had us stumped for a while. But at least we got it working and managed to put the names up on display. It was cool to see a dynamic webpage that we created.

Day 4

We got to move onto adding a player and game class at this point. It meant we had a game class which would start when you submitted your names. This would also make two players with the names provided. which keep everything together making everything neater. We also got around to adding hit points and an attack method but we didn't get around to using it.

Day 5

Today we started by using the attack method to do damage to player 2. We then moved on to making our controller a bit less cluttered. We removed the player 1 and 2 instance variables and move them into the game class. We then moved onto getting the game to switch player turns which we managed to do before running out of time.

Summary

Getting to make an actual functional webpage was a lot of fun. There is more of a reward for the work you put in and you can interact with your web page more like a real user. I enjoyed this part of the course cause everything is more tangible. Looking forward to the next couple of weeks we start JavaScript in week 5 and do our first group project in week 6.

Top comments (0)