• 大小: 6KB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-06-03
  • 语言: C/C++
  • 标签: C++  

资源简介

狼吃羊游戏简要代码,有基类和派生类,初级编码,清晰易懂。

资源截图

代码片段和文件信息

#include “organism.h“

//有参构造函数
Organism::Organism(World *worint xxint yy)
{
world = wor;
x = xx;
y = yy;
moved = false;
starveTime = 0;
surviveTime = 0;
wor->setAt(xythis);
}

//析构函数
Organism::~Organism()
{
if(world)
delete world;
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2016-08-27 11:13  Wolf and Sheep\
     文件         276  2016-06-12 15:11  Wolf and Sheep\organism.cpp
     文件         734  2016-05-31 14:32  Wolf and Sheep\organism.h
     文件        1933  2016-06-12 15:11  Wolf and Sheep\sheep.cpp
     文件         277  2016-05-31 15:54  Wolf and Sheep\sheep.h
     文件        1079  2016-06-27 11:50  Wolf and Sheep\test.cpp
     文件        2993  2016-06-12 15:12  Wolf and Sheep\wolf.cpp
     文件         271  2016-05-31 15:54  Wolf and Sheep\wolf.h
     文件        2124  2016-06-12 15:11  Wolf and Sheep\world.cpp
     文件         692  2016-06-27 11:51  Wolf and Sheep\world.h

评论

共有 条评论