master
IoTcat 5 years ago
parent d354d3ef1e
commit 188ce7cdb1
  1. BIN
      docs/1717608_Liu_Yimian_3.docx
  2. BIN
      docs/1717608_Liu_Yimian_3.pdf
  3. 16
      src/point.cpp
  4. 24
      src/point.h
  5. 4
      src/roll.h
  6. 4
      src/square.h
  7. 16
      src/startinterface.h

Binary file not shown.

Binary file not shown.

@ -12,51 +12,51 @@
#include <iostream>
void Point::Print()//输出点
void Point::Print() const//输出点
{
SetCursorPosition(x, y);
std::cout << "@" ;
}
void Point::PrintCircular()//输出圆形
void Point::PrintCircular() const//输出圆形
{
SetCursorPosition(x, y);
std::cout << "o" ;
}
void Point::PrintStar()//输出星星
void Point::PrintStar() const//输出星星
{
SetCursorPosition(x, y);
std::cout << " o" ;
}
void Point::PrintRowLine()//输出水平线
void Point::PrintRowLine() const//输出水平线
{
SetCursorPosition(x, y);
std::cout << "--" ;
}
void Point::PrintColumnLine()//输出水平线
void Point::PrintColumnLine() const//输出水平线
{
SetCursorPosition(x, y);
std::cout << "| " ;
}
void Point::PrintLeftLine()//输出左上下角
void Point::PrintLeftLine() const//输出左上下角
{
SetCursorPosition(x, y);
std::cout << "--" ;
}
void Point::PrintRightLine()//输出右上下角
void Point::PrintRightLine() const//输出右上下角
{
SetCursorPosition(x, y);
std::cout << "- " ;
}
void Point::Clear()//清除输出
void Point::Clear() const//清除输出
{
SetCursorPosition(x, y);
std::cout << " " ;

@ -25,22 +25,22 @@ class Point
public:
Point(){};
Point(const int x, const int y) : x(x), y(y) {};
void Print();
void PrintCircular();
void PrintStar();
void PrintRowLine();
void PrintColumnLine();
void PrintLeftLine();
void PrintRightLine();
void Clear();
void Print() const;
void PrintCircular() const;
void PrintStar() const;
void PrintRowLine() const;
void PrintColumnLine() const;
void PrintLeftLine() const;
void PrintRightLine() const;
void Clear() const;
void ChangePosition(const int x, const int y);
bool operator== (const Point& point) { return (point.x == this->x) && (point.y == this->y); }
inline const int GetX() const{ return this->x; }
inline const int GetY() const{ return this->y; }
inline void red(){SetColor(13);}
inline void yellow(){SetColor(14);}
inline void darkBlue(){SetColor(3);}
inline void lightBlue(){SetColor(11);}
inline void red() const{SetColor(13);}
inline void yellow() const{SetColor(14);}
inline void darkBlue() const{SetColor(3);}
inline void lightBlue() const{SetColor(11);}
private:
int x, y;
};

@ -38,13 +38,13 @@ public:
const int cast() const;
void clear() const;
void anime() const;
private:
int _X;
int _Y;
const int print(const int num) const;
void clear() const;
void anime() const;
};

@ -80,7 +80,6 @@ public:
void clear_ai() const;
void print();
void buy(Player& p);
void save();
inline const std::string getId() const{
return this->_id;
}
@ -91,7 +90,7 @@ public:
inline const unsigned short getLevel() const{
return this->_level;
};
friend class Player;
//friend class Player;
friend class Controller;
inline const int levelup(){
this->_level += 1;
@ -114,6 +113,7 @@ private:
ovo::math m;
void _drawLines(const int x, const int y);
void save();
};

@ -20,7 +20,7 @@
/**
* start interface
*
* @author yimian
* @author github.com/silence1772, yimian
* @category Monopoly Game
* @package startinterface
*/
@ -138,19 +138,19 @@ public:
textsnake.emplace_back(Point(p+2, 17));
textsnake.emplace_back(Point(p+2, 18));
}
void Action();
private:
std::deque<Point> startsnake;//开始动画中的蛇
std::vector<Point> textsnake;//开始动画中的文字
int speed;//动画的速度
}
void PrintFirst();
void PrintSecond();
void PrintThird();
void PrintText();
void ClearText();
void Action();
private:
std::deque<Point> startsnake;//开始动画中的蛇
std::vector<Point> textsnake;//开始动画中的文字
int speed;//动画的速度
};
#endif // __STRATINTERFACE_H_

Loading…
Cancel
Save