ELEC2645 (2019/20) / Mbed 2 deprecated ELEC2645_Project_el18s2a_2

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Apple Class Reference

Apple Class Reference

Apple Class File. More...

#include <Apple.h>

Public Member Functions

void init (int size)
 The Initial setup of the of the apple
void draw (N5110 &lcd)
 Draws the Apple on the LCD
Vector2D get_pos ()
void set_pos (Vector2D a)
 Sets the Position

Detailed Description

Apple Class File.

Class containing the apple that the snake uses to get score and increase in size.

Author:
Simon Atkinson
Date:
June 2020

Definition at line 14 of file Apple.h.


Member Function Documentation

void draw ( N5110 lcd )

Draws the Apple on the LCD

Definition at line 23 of file Apple.cpp.

Vector2D get_pos (  )
Returns:
Gives us position data

Definition at line 29 of file Apple.cpp.

void init ( int  size )

The Initial setup of the of the apple

Definition at line 14 of file Apple.cpp.

void set_pos ( Vector2D  a )

Sets the Position