레포트 (499)
2022년 2학기 방송통신대 C++프로그래밍 출석수업대체과제물)틱택토(tic-tac-toe) 게임을 진행하는 객체를 만들기
void boarddisplay(); // 보드 출력 함수char iswinner(); // 승자 확인 함수public:void initboard(); // 보드 초기화 함수 void playgame(); // 게임 진행 함수;FILE:tictactoe.cpp#include#include #include tictactoe.h using namespace std;// *틱택토 보드 초기화 함수*void Tictactoe::initboard() this->player = X; // 플레이어
5페이지 | 17,000원 | 2022.10.15
string.h>#define MAX 101#define max 100// QUEUEint queueMAX;int front, rear = 0;typedef struct //term int row;int col;int value; termvoid fasttranspose(term a, term b) int rowtermsMAX;int startingposMAX;int i, j;int numcol = a0.col;int numterms = a0.value;b0.row = numcol;b0.col = a0.row;b0.value = numterms;if (numterms > 0) for (i = 0; i < n
4페이지 | 1,000원 | 2022.07.25
string.h>#define MAX 40# define SWAP(x, y, temp) ( (temp)=(x), (x)=(y), (y)=(temp) )typedef struct node int n;struct node* next;NODEtypedef struct NODE* L1;NODE* L2;TMPvoid display(NODE* head) NODE* p = headwhile (p != NULL) printf(%d->, p->n);p = p->next;printf( );//NODE* addNode(int n) NODE* newnode;newnode = (NODE*)malloc(sizeof(NODE));newnode->n = nnewn
5페이지 | 1,000원 | 2022.07.24
VOID $$ = newTreeNode(TypeSpecifier); $$->type = Void; ;identifier : ID $$ = newTreeNode(Indentifier);$$->name = copyString(tokenString);;compoundstmt : LCURLY localdeclarations RCURLY $$ = newTreeNode(CompoundStmt);$$->child0 = $2;;localdeclarations : localdeclarations vardeclaration YYSTYPE t = $1;if (t != NULL) else $$ = $2; | empty $$ = $1; ;vardeclaration
12페이지 | 2,500원 | 2022.04.01
void Main(string args)int, array = new int2, 3;array0, 0 = 1;array0, 1 = 2;array0, 2 = 3;array1, 0 = 4;array1, 1 = 5;array1, 2 = 6;C# 프로그래밍 (배열)1차원 배열 실습철수실행 결과C# 프로그래밍 (2차원 배열)1 2 34 5 60, 0 : 1 0, 1 : 2 0, 2 : 31, 0 : 4 1, 1 : 5 1, 2 : 62차원 배열 실습실행 결과C# 프로그래
26페이지 | 1,800원 | 2021.12.09
10 C#프로그래밍 함수1, 2 오버로딩, ref , 스택과 힙 컬렉션
void main(String args)return메소드를 정의하고 호출합니다.그리고 retur으로 반환합니다.C# 프로그래밍 (메소드)Int a = 3Int b = 5a+b8인수 목록메소드 기능메소드 결과C# 프로그래밍 (메소드)빵 만드는 기계밀가루빵C# 프로그래밍 (메소드)빵 만드는 기계반환하지 않는 메소드 밀가루Public void Main(
42페이지 | 1,800원 | 2021.12.09
string Name;private int Velocity;public Point(int ID, int Name, int Velocity)this.ID = ID;this.Name = Name;this.Velocity = Velocity;public void Print()System.Console.WriteLine(“0,1,2”, this.ID, this.Name, this.Velocity);정적인 속성 (필드) 동적인 행동 (메소드) C# 클래스객체지향 언어OOP : Obejct Oriented Programming√추상화 (Abstra
33페이지 | 1,800원 | 2021.12.09
string name, int hp, int mp, int attack, int def):base(name, hp, attack, def)mMaxMP = mp;mMP = mp;mLevel = 1;mCurrentExp = 0;mMaxExp = 10;mGold = 0;public void AddExp(int amount) //경험치를 더할 때에는 양수만 포함되도록 진행if(amount >= 0)//경험치 획득mCurrentExp += amount;while (mCurrentExp >= mMaxExp) //레벨업 기능mLevel++; // 레벨 +1 상승
13페이지 | 1,800원 | 2021.12.09
string playerName = Console.ReadLine(); //플레이어 이름을 입력mPlayer = new Player(playerName, 10, 0, 1, 0); //플레이어 이름, hp, 공격력, 방어력public void MainLoop()while (true)//유저의 입력을 처리하는 상태 부분 Console.WriteLine( 로비 );Console.WriteLine(1.전투시작);Console.WriteLine(2.상점);Console.WriteLine(3.
12페이지 | 1,800원 | 2021.12.09
string name, int hp, int mp, int attack, int def):base(name, hp, attack, def)mMaxMP = mp;mMP = mp;mLevel = 1;mCurrentExp = 0;mMaxExp = 10;mGold = 100; //기본 골드 값 100원public void AddExp(int amount) //경험치를 더할 때에는 양수만 포함되도록 진행if(amount >= 0)//경험치 획득mCurrentExp += amount;while (mCurrentExp >= mMaxExp) //레벨업 기능
14페이지 | 1,800원 | 2021.12.09