Skip to content

Add files via upload #847

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added 8382/[8382]Verbin_Kirill/Debug/Game1.pdb
Binary file not shown.
10 changes: 10 additions & 0 deletions 8382/[8382]Verbin_Kirill/Game1/Debug/Game1.Build.CppClean.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
c:\users\frast\source\repos\game1\debug\game1.exe
c:\users\frast\source\repos\game1\debug\game1.ilk
c:\users\frast\source\repos\game1\debug\game1.pdb
c:\users\frast\source\repos\game1\game1\debug\game1.obj.enc
c:\users\frast\source\repos\game1\game1\debug\vc142.idb
c:\users\frast\source\repos\game1\game1\debug\vc142.pdb
c:\users\frast\source\repos\game1\game1\debug\game1.tlog\cl.command.1.tlog
c:\users\frast\source\repos\game1\game1\debug\game1.tlog\link.command.1.tlog
c:\users\frast\source\repos\game1\game1\debug\game1.tlog\link.read.1.tlog
c:\users\frast\source\repos\game1\game1\debug\game1.tlog\link.write.1.tlog
65 changes: 65 additions & 0 deletions 8382/[8382]Verbin_Kirill/Game1/Debug/Game1.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
 Game1.cpp
C:\Users\frast\source\repos\Game1\Game1\surse.h(7,6): error C2086: int Load::x: переопределение
C:\Users\frast\source\repos\Game1\Game1\surse.h(4): message : см. объявление "Load::x"
C:\Users\frast\source\repos\Game1\Game1\surse.h(8,6): error C2086: int Load::y: переопределение
C:\Users\frast\source\repos\Game1\Game1\surse.h(4): message : см. объявление "Load::y"
C:\Users\frast\source\repos\Game1\Game1\surse.cpp(3,27): error C2533: Load::{ctor}: конструкторы не разрешены для возвращаемого типа
C:\Users\frast\source\repos\Game1\Game1\surse.cpp(6,21): error C2440: =: невозможно преобразовать "int *" в "int **"
C:\Users\frast\source\repos\Game1\Game1\surse.cpp(6,7): message : Типы, на которые указывают указатели, не связаны; для преобразования требуется reinterpret_cast, приведение в стиле С или приведение в стиле функции
C:\Users\frast\source\repos\Game1\Game1\surse.cpp(7,21): error C2440: =: невозможно преобразовать "int *" в "int **"
C:\Users\frast\source\repos\Game1\Game1\surse.cpp(7,7): message : Типы, на которые указывают указатели, не связаны; для преобразования требуется reinterpret_cast, приведение в стиле С или приведение в стиле функции
C:\Users\frast\source\repos\Game1\Game1\surse.cpp(8,2): error C2065: count: необъявленный идентификатор
C:\Users\frast\source\repos\Game1\Game1\surse.cpp(11,8): error C2065: count: необъявленный идентификатор
C:\Users\frast\source\repos\Game1\Game1\surse.cpp(11,22): error C2065: count: необъявленный идентификатор
C:\Users\frast\source\repos\Game1\Game1\surse.cpp(11,36): error C2065: count: необъявленный идентификатор
C:\Users\frast\source\repos\Game1\Game1\surse.cpp(14,13): error C2065: count: необъявленный идентификатор
C:\Users\frast\source\repos\Game1\Game1\surse.cpp(14,27): error C2065: count: необъявленный идентификатор
C:\Users\frast\source\repos\Game1\Game1\surse.cpp(14,41): error C2065: count: необъявленный идентификатор
C:\Users\frast\source\repos\Game1\Game1\surse.cpp(20,8): error C2065: count: необъявленный идентификатор
C:\Users\frast\source\repos\Game1\Game1\surse.cpp(20,22): error C2065: count: необъявленный идентификатор
C:\Users\frast\source\repos\Game1\Game1\surse.cpp(20,36): error C2065: count: необъявленный идентификатор
C:\Users\frast\source\repos\Game1\Game1\surse.cpp(23,13): error C2065: count: необъявленный идентификатор
C:\Users\frast\source\repos\Game1\Game1\surse.cpp(23,27): error C2065: count: необъявленный идентификатор
C:\Users\frast\source\repos\Game1\Game1\surse.cpp(23,41): error C2065: count: необъявленный идентификатор
C:\Users\frast\source\repos\Game1\Game1\surse.cpp(26,13): error C2065: count: необъявленный идентификатор
C:\Users\frast\source\repos\Game1\Game1\surse.cpp(32,4): error C2065: count: необъявленный идентификатор
C:\Users\frast\source\repos\Game1\Game1\LogikScript.cpp(3,39): error C2248: Load::Load: невозможно обратиться к private член, объявленному в классе "Load"
C:\Users\frast\source\repos\Game1\Game1\surse.cpp(3): message : см. объявление "Load::Load"
C:\Users\frast\source\repos\Game1\Game1\surse.h(3): message : см. объявление "Load"
C:\Users\frast\source\repos\Game1\Game1\LogikScript.cpp(4,10): error C2248: Load::Load: невозможно обратиться к private член, объявленному в классе "Load"
C:\Users\frast\source\repos\Game1\Game1\surse.cpp(3): message : см. объявление "Load::Load"
C:\Users\frast\source\repos\Game1\Game1\surse.h(3): message : см. объявление "Load"
C:\Users\frast\source\repos\Game1\Game1\LogikScript.cpp(4,16): error C2264: Load::Load: ошибка в определении или объявлении функции; функция не вызвана
C:\Users\frast\source\repos\Game1\Game1\LogikScript.cpp(5,19): error C2248: Load::np: невозможно обратиться к private член, объявленному в классе "Load"
C:\Users\frast\source\repos\Game1\Game1\surse.h(5): message : см. объявление "Load::np"
C:\Users\frast\source\repos\Game1\Game1\surse.h(3): message : см. объявление "Load"
C:\Users\frast\source\repos\Game1\Game1\LogikScript.cpp(5,25): error C2248: Load::tp: невозможно обратиться к private член, объявленному в классе "Load"
C:\Users\frast\source\repos\Game1\Game1\surse.h(6): message : см. объявление "Load::tp"
C:\Users\frast\source\repos\Game1\Game1\surse.h(3): message : см. объявление "Load"
C:\Users\frast\source\repos\Game1\Game1\LogikScript.cpp(5,31): error C2248: Load::x: невозможно обратиться к private член, объявленному в классе "Load"
C:\Users\frast\source\repos\Game1\Game1\surse.h(4): message : см. объявление "Load::x"
C:\Users\frast\source\repos\Game1\Game1\surse.h(3): message : см. объявление "Load"
C:\Users\frast\source\repos\Game1\Game1\LogikScript.cpp(5,36): error C2248: Load::y: невозможно обратиться к private член, объявленному в классе "Load"
C:\Users\frast\source\repos\Game1\Game1\surse.h(4): message : см. объявление "Load::y"
C:\Users\frast\source\repos\Game1\Game1\surse.h(3): message : см. объявление "Load"
C:\Users\frast\source\repos\Game1\Game1\LogikScript.cpp(61,8): error C2065: att_arr: необъявленный идентификатор
C:\Users\frast\source\repos\Game1\Game1\LogikScript.cpp(61,27): error C2065: B2: необъявленный идентификатор
C:\Users\frast\source\repos\Game1\Game1\LogikScript.cpp(61,108): error C2065: j: необъявленный идентификатор
C:\Users\frast\source\repos\Game1\Game1\LogikScript.cpp(61,111): error C2065: k: необъявленный идентификатор
C:\Users\frast\source\repos\Game1\Game1\LogikScript.cpp(61,113): error C2660: Unit::Attack: функция не принимает 1 аргументов
C:\Users\frast\source\repos\Game1\Game1\unit.h(13,14): message : см. объявление "Unit::Attack"
C:\Users\frast\source\repos\Game1\Game1\LogikScript.cpp(66,113): error C2065: k: необъявленный идентификатор
C:\Users\frast\source\repos\Game1\Game1\LogikScript.cpp(66,115): error C2660: Unit::Attack: функция не принимает 1 аргументов
C:\Users\frast\source\repos\Game1\Game1\unit.h(13,14): message : см. объявление "Unit::Attack"
C:\Users\frast\source\repos\Game1\Game1\LogikScript.cpp(74,6): error C2374: l: переопределение; множественная инициализация
C:\Users\frast\source\repos\Game1\Game1\LogikScript.cpp(45): message : см. объявление "l"
C:\Users\frast\source\repos\Game1\Game1\LogikScript.cpp(90,8): error C2065: att_arr: необъявленный идентификатор
C:\Users\frast\source\repos\Game1\Game1\LogikScript.cpp(90,27): error C2065: B1: необъявленный идентификатор
C:\Users\frast\source\repos\Game1\Game1\LogikScript.cpp(90,108): error C2065: j: необъявленный идентификатор
C:\Users\frast\source\repos\Game1\Game1\LogikScript.cpp(90,111): error C2065: k: необъявленный идентификатор
C:\Users\frast\source\repos\Game1\Game1\LogikScript.cpp(90,113): error C2660: Unit::Attack: функция не принимает 1 аргументов
C:\Users\frast\source\repos\Game1\Game1\unit.h(13,14): message : см. объявление "Unit::Attack"
C:\Users\frast\source\repos\Game1\Game1\LogikScript.cpp(94,157): error C2065: k: необъявленный идентификатор
C:\Users\frast\source\repos\Game1\Game1\LogikScript.cpp(94,159): error C2660: Unit::Attack: функция не принимает 1 аргументов
C:\Users\frast\source\repos\Game1\Game1\unit.h(13,14): message : см. объявление "Unit::Attack"
C:\Users\frast\source\repos\Game1\Game1\LogikScript.cpp(103,24): error C2653: GameObject: не является именем класса или пространства имен
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
��
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#TargetFrameworkVersion=v4.0:PlatformToolSet=v142:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit:WindowsTargetPlatformVersion=10.0
Debug|Win32|C:\Users\frast\source\repos\Game1\|
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
��
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
��
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
��
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
��
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
��
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
��
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
��
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
��
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
��
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
��
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
��
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
��
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
��
1 change: 1 addition & 0 deletions 8382/[8382]Verbin_Kirill/Game1/archer.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#include "archer.h"
13 changes: 13 additions & 0 deletions 8382/[8382]Verbin_Kirill/Game1/archer.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#ifndef ARCHER
#define ARCHER
#include "unit.h"

class Archer : public Unit {
public:
Archer() = default;
virtual void Mapping(int, int, int) = 0;
virtual int Move(int, int) = 0;
virtual int Attack(int**, int) = 0;
virtual void GetDamage(int) = 0 ;
};
#endif
257 changes: 257 additions & 0 deletions 8382/[8382]Verbin_Kirill/Game1/army.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,257 @@
#include "army.h"


HeavyRider::HeavyRider() {
hp = 50;
dp = 10;
}

int HeavyRider::Move(int x, int y) {
if (this->x + x < 7 && this->x + x > 0 && this->y + y < 14 && this->y + y > 0) {
if (abs(x) + abs(y) <= 4) {
this->x += x;
this->y += y;
}
else {
return 0;
}
}
else {
return 0;
}
return 1;
}

int HeavyRider::Attack(int** map, int at) {
for (int i = 0; i < 7; i++) {
for (int j = 0; j < 14; j++) {
if (map[i][j] == at && (abs(this->x - i) + abs(this->y) - i == 1)) {
return this->dp;
}
}
}
return 0;
}

void HeavyRider::GetDamage(int d) {
this->hp -= d;
}

void HeavyRider::Mapping(int x, int y, int id) {
this->x = x;
this->y = y;
this->id = id;
}

HeavyArcher::HeavyArcher() {
hp = 30;
dp = 5;
}

int HeavyArcher::Move(int x, int y) {
if (this->x + x < 7 && this->x + x > 0 && this->y + y < 14 && this->y + y > 0) {
if (abs(x) + abs(y) <= 2) {
this->x += x;
this->y += y;
}
else {
return 0;
}
}
else {
return 0;
}
return 1;
}

int HeavyArcher::Attack(int** map, int at) {
for (int i = 0; i < 7; i++) {
for (int j = 0; j < 14; j++) {
if (map[i][j] == at && (abs(this->x - i) + abs(this->y) - i <= 4)) {
return this->dp;
}
}
}
return 0;
}

void HeavyArcher::GetDamage(int d) {
this->hp -= d;
}

void HeavyArcher::Mapping(int x, int y, int id) {
this->x = x;
this->y = y;
this->id = id;
}

HeavySaber::HeavySaber() {
hp = 40;
dp = 7;

}

int HeavySaber::Move(int x, int y) {
if (this->x + x < 7 && this->x + x > 0 && this->y + y < 14 && this->y + y > 0) {
if (abs(x) + abs(y) <= 2) {
this->x += x;
this->y += y;
}
else {
return 0;
}
}
else {
return 0;
}
return 1;
}

int HeavySaber::Attack(int** map, int at) {
for (int i = 0; i < 7; i++) {
for (int j = 0; j < 14; j++) {
if (map[i][j] == at && (abs(this->x - i) + abs(this->y) - i == 1)) {
return this->dp;
}
}
}
return 0;
}

void HeavySaber::GetDamage(int d) {
this->hp -= d;
}

void HeavySaber::Mapping(int x, int y, int id) {
this->x = x;
this->y = y;
this->id = id;
}

LightRider::LightRider() {
hp = 35;
dp = 10;

}

int LightRider::Move(int x, int y) {
if (this->x + x < 7 && this->x + x > 0 && this->y + y < 14 && this->y + y > 0) {
if (abs(x) + abs(y) <= 5) {
this->x += x;
this->y += y;
}
else {
return 0;
}
}
else {
return 0;
}
return 1;
}

int LightRider::Attack(int** map, int at) {
for (int i = 0; i < 7; i++) {
for (int j = 0; j < 14; j++) {
if (map[i][j] == at && (abs(this->x - i) + abs(this->y) - i == 1)) {
return this->dp;
}
}
}
return 0;
}

void LightRider::GetDamage(int d) {
this->hp -= d;
}

void LightRider::Mapping(int x, int y, int id) {
this->x = x;
this->y = y;
this->id = id;
}

LightArcher::LightArcher() {
hp = 15;
dp = 5;

}

int LightArcher::Move(int x, int y) {
if (this->x + x < 7 && this->x + x > 0 && this->y + y < 14 && this->y + y > 0) {
if (abs(x) + abs(y) <= 3) {
this->x += x;
this->y += y;
}
else {
return 0;
}
}
else {
return 0;
}
return 1;
}

int LightArcher::Attack(int** map, int at) {
for (int i = 0; i < 7; i++) {
for (int j = 0; j < 14; j++) {
if (map[i][j] == at && (abs(this->x - i) + abs(this->y) - i <= 5)) {
return this->dp;
}
}
}
return 0;
}

void LightArcher::GetDamage(int d) {
this->hp -= d;
}

void LightArcher::Mapping(int x, int y, int id) {
this->x = x;
this->y = y;
this->id = id;
}

LightSaber::LightSaber() {
hp = 25;
dp = 7;
}

int LightSaber::Move(int x, int y) {
if (this->x + x < 7 && this->x + x > 0 && this->y + y < 14 && this->y + y > 0) {
if (abs(x) + abs(y) <= 3) {
this->x += x;
this->y += y;
}
else {
return 0;
}
}
else {
return 0;
}
return 1;
}

int LightSaber::Attack(int** map, int at) {
for (int i = 0; i < 7; i++) {
for (int j = 0; j < 14; j++) {
if (map[i][j] == at && (abs(this->x - i) + abs(this->y) - i == 1)) {
return this->dp;
}
}
}
return 0;
}

void LightSaber::GetDamage(int d) {
this->hp -= d;
}

void LightSaber::Mapping(int x, int y, int id) {
this->x = x;
this->y = y;
this->id = id;
}
Loading