Search found 5 matches
- April 15th, 2017, 3:29 am
- Forum: Everything
- Topic: Snake Game Tutorial 14a
- Replies: 69
- Views: 60790
Re: Snake Game Tutorial 14a
I see. So ( loc.y * width + loc.x ) is the input of the individual coordinates of the cell in the grid. I was having trouble visualising what it meant but now i understand. Thanks for the explanation @albinopapa! So bool CheckForObstacle(const Location& loc) const; just returns the bool element of a...
- April 14th, 2017, 2:22 pm
- Forum: Everything
- Topic: Snake Game Tutorial 14a
- Replies: 69
- Views: 60790
Re: Snake Game Tutorial 14a
Hello again my friends! I've finished tutorial 14b and was trying out the homework section and I have a question regarding the spawning of the obstacle. I looked through the github file Chili put up in the wiki and there's several areas I'm unclear on. First, what happens when u set a boolean statem...
- April 14th, 2017, 3:26 am
- Forum: Everything
- Topic: Snake Game Tutorial 14a
- Replies: 69
- Views: 60790
Re: Snake Game Tutorial 14a
Right I removed the constructor i made for the location struct and it built successfully. Thanks for the help guys!
- April 13th, 2017, 3:46 pm
- Forum: Everything
- Topic: Snake Game Tutorial 14a
- Replies: 69
- Views: 60790
Re: Snake Game Tutorial 14a
You're missing the default constructor for the segment You want like Segment() = default; Where do i put the default constructor for the segment? I wrote it as Segment() = default; under the segment class and it still has the same error of trying to reference a deleted function. 1>c:\users\Adagio\d...
- April 13th, 2017, 11:29 am
- Forum: Everything
- Topic: Snake Game Tutorial 14a
- Replies: 69
- Views: 60790
Re: Snake Game Tutorial 14a
Hey guys! New to this forum and programming in general. I've just finished going through tutorial 14a and I tried writing the code up till that point but I'm unable to build the code successfully. The constructor for snake::snake has an error that reads "the default constructor of "Snake::Segment" c...