Tyler Altenhofen / MVC
Committer:
tyleralt
Date:
Tue May 12 16:21:33 2015 +0000
Revision:
4:f1e33a234a74
Parent:
2:891b3618be4f
Working for the demo. Points come back around to center after exiting edge

Who changed what in which revision?

UserRevisionLine numberNew contents of line
tyleralt 2:891b3618be4f 1
tyleralt 2:891b3618be4f 2 #include "Block.h"
tyleralt 2:891b3618be4f 3 //*********************point class************************//
tyleralt 2:891b3618be4f 4
tyleralt 2:891b3618be4f 5 Block :: Block (int xi, int yi, int zi, int sizei, int heighti){
tyleralt 2:891b3618be4f 6 x = xi;
tyleralt 2:891b3618be4f 7 y = yi;
tyleralt 2:891b3618be4f 8 z = zi;
tyleralt 2:891b3618be4f 9 size = sizei;
tyleralt 2:891b3618be4f 10 height = heighti;
tyleralt 2:891b3618be4f 11 }
tyleralt 2:891b3618be4f 12 Block :: Block (){
tyleralt 2:891b3618be4f 13 x = 0;
tyleralt 2:891b3618be4f 14 y = 0;
tyleralt 2:891b3618be4f 15 z = 0;
tyleralt 2:891b3618be4f 16 size = 0;
tyleralt 2:891b3618be4f 17 height = 0;
tyleralt 2:891b3618be4f 18 }
tyleralt 2:891b3618be4f 19
tyleralt 2:891b3618be4f 20
tyleralt 2:891b3618be4f 21 void Block :: moveRight(){
tyleralt 4:f1e33a234a74 22 x = (x + 1);
tyleralt 2:891b3618be4f 23 }
tyleralt 2:891b3618be4f 24 void Block :: moveLeft(){
tyleralt 4:f1e33a234a74 25 x = (x - 1);
tyleralt 2:891b3618be4f 26 }
tyleralt 2:891b3618be4f 27 void Block :: moveIn(){
tyleralt 2:891b3618be4f 28 y--;
tyleralt 2:891b3618be4f 29 }
tyleralt 2:891b3618be4f 30 void Block :: moveOut(){
tyleralt 2:891b3618be4f 31 y++;
tyleralt 2:891b3618be4f 32 }