root/lang/cplusplus/hebilife/snake.h

Revision 12838, 0.8 kB (checked in by tosik, 7 months ago)

hebilife : updated some comments

  • Property svn:eol-style set to CRLF
Line 
1#pragma once
2
3#include "field.h"
4#include "brain.h"
5
6class Snake
7{
8        public:
9
10                Snake(int id, Field *field);
11                Snake(int id, Field *field, Snake *s);
12               
13                // step�����Ɉ��q�ɂ��s����肵�A���ɍs������         void pre_move();
14
15                // 1�X�e�b�v�i��
16                void step();
17
18
19                // �̂̒���
20                int length;
21
22                // ��
23                int body_x[100];
24                int body_y[100];
25
26                int pre_body_x[100];
27                int pre_body_y[100];
28
29                bool is_dead;
30
31        private:
32                // pre_move �Ō��肵���s����ۂɍs��
33                void move();
34
35                // ���ʁi�\���I���Ȃ��j
36                void die();
37
38                // ������ׂ�             void eat();
39
40                // ���􂷂�                void segmentation();
41
42                // �S�Ă�nake��ield��Ƃ���                Field *field;
43
44                // ������               int direction_x;
45                int direction_y;
46
47                // �I�u�W�F�N�g�Ɋ��蓖�Ă��郆�j�[�N�Ȕԍ�
48                int id;
49
50                Brain brain;
51};
52
Note: See TracBrowser for help on using the browser.