ECE 2035 AgarIO MiniProject
Dependencies: 4DGL-uLCD-SE ECE2035_Agar_Shell EthernetInterface Game_Synchronizer MMA8452 SDFileSystem Sound USBDevice mbed-rtos mbed wave_player
Fork of ECE2035_Agar_Shell by
This program is a MiniProject given in ECE 2035. This is to design and program the multiplayer ethernet based AGAR.IO mbed game. Starting code is given by the instructor to aid student to complete the project. It utilize uLCD, Accelerometer, pushbuttons, sdFileSystem, ethernetBreakoutBoard, speaker in mBED LPC1768. It uses the similar concept to the Game http://agar.io/
blob.h@1:e487713a5231, 2017-03-18 (annotated)
- Committer:
- pkoirala3
- Date:
- Sat Mar 18 14:55:51 2017 +0000
- Revision:
- 1:e487713a5231
- Parent:
- 0:9d6ea88b6d14
EC 2035 MiniProject AGARIO
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
jford38 | 0:9d6ea88b6d14 | 1 | #include "misc.h" |
jford38 | 0:9d6ea88b6d14 | 2 | |
jford38 | 0:9d6ea88b6d14 | 3 | typedef struct blob { |
jford38 | 0:9d6ea88b6d14 | 4 | float old_x, old_y; |
jford38 | 0:9d6ea88b6d14 | 5 | float posx, posy; |
jford38 | 0:9d6ea88b6d14 | 6 | float vx, vy; |
jford38 | 0:9d6ea88b6d14 | 7 | float rad; |
jford38 | 0:9d6ea88b6d14 | 8 | int color; |
jford38 | 0:9d6ea88b6d14 | 9 | bool valid; |
jford38 | 0:9d6ea88b6d14 | 10 | bool delete_now; |
pkoirala3 | 1:e487713a5231 | 11 | } BLOB; // Type of this structure is: BLOB, user created type |
jford38 | 0:9d6ea88b6d14 | 12 | |
jford38 | 0:9d6ea88b6d14 | 13 | void BLOB_init(BLOB* b); |
jford38 | 0:9d6ea88b6d14 | 14 | void BLOB_init(BLOB* b, int rad); |
jford38 | 0:9d6ea88b6d14 | 15 | void BLOB_init(BLOB* b, int rad, int color); |
jford38 | 0:9d6ea88b6d14 | 16 | |
jford38 | 0:9d6ea88b6d14 | 17 | void BLOB_constrain2world(BLOB* b); |
jford38 | 0:9d6ea88b6d14 | 18 | void BLOB_print(BLOB b); |
jford38 | 0:9d6ea88b6d14 | 19 | float BLOB_dist2(BLOB b1, BLOB b2); |