This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifdef _DEBUG | |
#pragma comment(lib,"sfml-graphics-d.lib") | |
#pragma comment(lib,"sfml-audio-d.lib") | |
#pragma comment(lib,"sfml-system-d.lib") | |
#pragma comment(lib,"sfml-window-d.lib") | |
#pragma comment(lib,"sfml-network-d.lib") | |
//#pragma comment(lib,"thor-d.lib") | |
#else | |
#pragma comment(lib,"sfml-graphics.lib") | |
#pragma comment(lib,"sfml-audio.lib") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifdef _DEBUG | |
#pragma comment(lib,"sfml-graphics-d.lib") | |
#pragma comment(lib,"sfml-audio-d.lib") | |
#pragma comment(lib,"sfml-system-d.lib") | |
#pragma comment(lib,"sfml-window-d.lib") | |
#pragma comment(lib,"sfml-network-d.lib") | |
//#pragma comment(lib,"thor-d.lib") | |
#else | |
#pragma comment(lib,"sfml-graphics.lib") | |
#pragma comment(lib,"sfml-audio.lib") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <vector> | |
#include <string> | |
class Book { | |
public: | |
std::string title; | |
double price; | |
Book(std::string t, double p) : title(t), price(p) {} | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
class ChaseStrategy{ | |
public: | |
virtual void chase() = 0; | |
}; | |
class RandomChase : public ChaseStrategy { | |
void chase() override { | |
std::cout << "Randomly wander around\n"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <string> | |
#include <vector> | |
class Drawable { | |
public: | |
virtual void draw() const = 0; | |
}; | |
class Shape : public Drawable { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <memory> | |
#include <string> | |
// English implementation | |
class EnglishChatbot { | |
public: | |
void hello() override { | |
std::cout << "Hello!" << std::endl; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Name: | |
// Login: | |
// Date: | |
// Approximate time taken: | |
//--------------------------------------------------------------------------- | |
// Project description: TEMPLATE | |
// --------------------------------------------------------------------------- | |
// Known Bugs: | |
// ? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <memory> | |
#include <string> | |
// Abstract base class (interface) | |
class Chatbot { | |
public: | |
virtual void hello() = 0; | |
virtual void goodbye() = 0; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Customer { | |
private String name; | |
private Address address; | |
public Customer(String name, Address address) { | |
this.name = name; | |
this.address = address; | |
} | |
public Address getAddress() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Health{ | |
private: | |
int health; | |
Player& player; | |
public: | |
Health(Player& player) : player(player) {} | |
void change(int amount){ |
NewerOlder