Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision

Target

Select target project
  • aa2-olow/assignment_2020
  • n2-alanzi/assignment_2020
  • w3-everett/assignment_2020
  • m36-king/miles-k-ing-programming-assignment
  • l2-mendygral/assignment_2020
  • g2-locke/assignment_2020
  • m2-byers/assignment_2020
  • k29-ali/assignment_2020
  • j2-bartrop/assignment_2020
  • s2-maimascu/assignment_2020
  • o3-griffiths/assignment_2020
  • m3-albaker/assignment_2020
  • d2-ptak/assignment_2020
  • j4-cottle/assignment_2020
  • a2-almoftah/assignment_2020
  • br-gaster/assignment_2020
  • c2-riordan/assignment_2020
  • r2-meguetif/assignment_2020
  • m2-szlafke/assignment_2020
  • d22-holmes/assignment_2020
  • d84-smith/assignment_2020
  • hg2-alahmadi/assignment_2020
  • t2-hayat/assignment_2020
  • r2-alqadhi/assignment_2020
  • d2-rutkis/assignment_2020
  • t2-collyer/assignment_2020
  • y2-binyahya/assignment_2020
  • h2-ale/assignment_2020
  • h8-cox/assignment_2020
  • j3-caisey/assignment_2020
  • mct2-hodgson/assignment_2020
  • j3-clarkeprice/assignment_2020
  • aeh2-park/assignment_2020
  • c29-chapman/assignment_2020
  • j2-fawcett/assignment_2020
  • et2-stoker/assignment_2020
  • s46-james/assignment_2020
  • h2-alsaloumi/assignment_2020
  • a2-almarri/assignment_2020
  • mym2-bukshaish/assignment_2020
  • i2-papageorgio/assignment_2020
  • pg2-jacksonsan/assignment_2020
  • s2-lacatusu/assignment_2022
  • j38-chan/assignment-2023
  • a33-kumar/assignment_2020
  • nj2-thapa/assignment_2020
  • k4-karki/assignment-2024
47 results
Select Git revision
Show changes
Commits on Source (2)
{
"configurations": [
{
"name": "Win32",
"includePath": [
"${workspaceFolder}/**"
],
"defines": [
"_DEBUG",
"UNICODE",
"_UNICODE"
],
"windowsSdkVersion": "10.0.18362.0",
"compilerPath": "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.27.29110/bin/Hostx64/x64/cl.exe",
"cStandard": "c17",
"cppStandard": "c++17",
"intelliSenseMode": "${default}"
}
],
"version": 4
}
\ No newline at end of file
{
"C_Cpp.errorSquiggles": "Enabled"
}
\ No newline at end of file
...@@ -5,8 +5,7 @@ ...@@ -5,8 +5,7 @@
"type": "shell", "type": "shell",
"label": "Make", "label": "Make",
"command": "/usr/bin/make", "command": "/usr/bin/make",
"args": [ "args": [],
],
"options": { "options": {
"cwd": "${workspaceFolder}" "cwd": "${workspaceFolder}"
}, },
...@@ -33,7 +32,10 @@ ...@@ -33,7 +32,10 @@
"problemMatcher": [ "problemMatcher": [
"$msCompile" "$msCompile"
], ],
"group": "build" "group": {
"kind": "build",
"isDefault": true
}
} }
] ]
} }
\ No newline at end of file
## TIC-TAC-TOE ##
Instructions:
This is the infamous game of Tic-Tac-Toe or Naughts and Crosses.
- To play this game you need to get three O's or X's in a row.
- Once you have done that you will be the winner.
- You can select a O or X by pressing the relevant button and you will see that the output changes.
- Once you have three in a line, you will see the winner screen appear.
Behind the Scenes:
To make this program work, each button that is seen on screen is a programed draw function placed within an If statement, so when the button is pressed visible chages happen on screen. The most obvious change is the background colour of the button which changes from Green to Blue, as well as that the text also changes from O and X retrospectively depending on what option is selected.
Following on, an If statement is running in a loop for the duration of there being no winner to determine if the O or X have alligned to make a winner, once a winner is found the variable changes from 0 to 1 and a popup appears in the centre of the screen to alert the Player of a win.
Error Log 26/01/2021:
- The game is now able to played, however the winner screen does not pop up when it detects a winner - it constantly says there is a winner even if the game hasn't been played yet.
Error Log 21/01/2021:
- Currently the buttons are always on and default to a O, ideally a radio button approach is required, in where the Player selects the appropriate option
either O or X and then this will change the output that the Player sees. This would then make sure the game works fully and minimise the winner screen coming up straight away.
- When a winner is found, the program doesn't identify which option has won, this could be an easy addition using cout to display if O or X has won.
\ No newline at end of file
#include <iostream> #include <iostream>
#include <string>
#include <sstream>
#include <iomanip> #include <iomanip>
#include <vector> #include <vector>
#include <cstring> #include <cstring>
#include <tuple> #include <tuple>
#include <context.hpp> #include <context.hpp>
#include <app.hpp> #include <app.hpp>
using namespace std; using namespace std;
const int width = 640; const int width = 340;
const int height = 480; const int height = 430;
class MyApp: public uwe::App { class MyApp: public uwe::App {
private: private:
uwe::Font font90_; //X and O font
uwe::Font font30_;
uwe::Font font30blue_;
int winner = 0; //winner variable
//Button Boolean
bool opbutt1 = false;
bool opbutt2 = false;
bool opbutt3 = false;
bool opbutt4 = false;
bool opbutt5 = false;
bool opbutt6 = false;
bool opbutt7 = false;
bool opbutt8 = false;
bool opbutt9 = false;
bool opbutt10 = false;
bool opbutt11 = false;
bool opbutt12 = false;
bool opbutt13 = false;
bool opbutt14 = false;
bool opbutt15 = false;
bool opbutt16 = false;
bool opbutt17 = false;
bool opbutt18 = false;
char char_buttonClicked1;
char char_buttonClicked2;
char char_buttonClicked3;
char char_buttonClicked4;
char char_buttonClicked5;
char char_buttonClicked6;
char char_buttonClicked7;
char char_buttonClicked8;
char char_buttonClicked9;
public: public:
MyApp(int width, int height, std::string title); MyApp(int width, int height, std::string title);
~MyApp(); ~MyApp();
...@@ -38,17 +86,52 @@ MyApp::~MyApp() { ...@@ -38,17 +86,52 @@ MyApp::~MyApp() {
} }
void MyApp::begin() { void MyApp::begin() {
font90_ = create_font("../assets/fonts/FreeSans.ttf", 90, uwe::Colour::red());
font30_ = create_font("../assets/fonts/FreeSans.ttf", 30, uwe::Colour::red());
font30blue_ = create_font("../assets/fonts/FreeSans.ttf", 30, uwe::Colour::blue());
} }
void MyApp::update() { void MyApp::update() {
if ((char_buttonClicked1 = 'X') && (char_buttonClicked4 = 'X') && (char_buttonClicked7 = 'X')) {
winner = 1;
} else if ((char_buttonClicked2 = 'X') && (char_buttonClicked5 = 'X') && (char_buttonClicked8 = 'X')) {
winner = 1;
} else if ((char_buttonClicked2 = 'X') && (char_buttonClicked5 = 'X') && (char_buttonClicked8 = 'X')) {
winner = 1;
} else if ((char_buttonClicked1 = 'X') && (char_buttonClicked2 = 'X') && (char_buttonClicked3 = 'X')) {
winner = 1;
} else if ((char_buttonClicked4 = 'X') && (char_buttonClicked5 = 'X') && (char_buttonClicked6 = 'X')) {
winner = 1;
} else if ((char_buttonClicked7 = 'X') && (char_buttonClicked8 = 'X') && (char_buttonClicked9 = 'X')) {
winner = 1;
} else if ((char_buttonClicked1 = 'X') && (char_buttonClicked5 = 'X') && (char_buttonClicked9 = 'X')) {
winner = 1;
} else if ((char_buttonClicked3 = 'X') && (char_buttonClicked5 = 'X') && (char_buttonClicked7 = 'X')) {
winner = 1;
} else if ((char_buttonClicked1 = 'O') && (char_buttonClicked4 = 'O') && (char_buttonClicked7 = 'O')) {
winner = 1;
} else if ((char_buttonClicked2 = 'O') && (char_buttonClicked5 = 'O') && (char_buttonClicked8 = 'O')) {
winner = 1;
} else if ((char_buttonClicked2 = 'O') && (char_buttonClicked5 = 'O') && (char_buttonClicked8 = 'O')) {
winner = 1;
} else if ((char_buttonClicked1 = 'O') && (char_buttonClicked2 = 'O') && (char_buttonClicked3 = 'O')) {
winner = 1;
} else if ((char_buttonClicked4 = 'O') && (char_buttonClicked5 = 'O') && (char_buttonClicked6 = 'O')) {
winner = 1;
} else if ((char_buttonClicked7 = 'O') && (char_buttonClicked8 = 'O') && (char_buttonClicked9 = 'O')) {
winner = 1;
} else if ((char_buttonClicked1 = 'O') && (char_buttonClicked5 = 'O') && (char_buttonClicked9 = 'O')) {
winner = 1;
} else if ((char_buttonClicked3 = 'O') && (char_buttonClicked5 = 'O') && (char_buttonClicked7 = 'O')) {
winner = 1;
}
cout << winner;
} }
void MyApp::key_pressed(uwe::Scancode scancode, bool repeat) { void MyApp::key_pressed(uwe::Scancode scancode, bool repeat) {
switch (scancode) { switch (scancode) {
default: { default: {
// nothing see here
} }
} }
} }
...@@ -57,6 +140,83 @@ void MyApp::mouse_pressed(int x, int y, uwe::Button button) { ...@@ -57,6 +140,83 @@ void MyApp::mouse_pressed(int x, int y, uwe::Button button) {
} }
void MyApp::mouse_released(int x, int y, uwe::Button button) { void MyApp::mouse_released(int x, int y, uwe::Button button) {
//Button Config to allow change
//Top line of tic-tac-toe
if( (x > 10 && y > 110) && (x < (10 + 45) && y < (110 + 30)) ){
opbutt1 = true;
}
if( (x > 65 && y > 110) && (x < (65 + 45) && y < (110 + 30)) ){
opbutt2 = true;
}
if( (x > 120 && y > 110) && (x < (120 + 45) && y < (110 + 30)) ){
opbutt3 = true;
}
if( (x > 175 && y > 110) && (x < (175 + 45) && y < (110 + 30)) ){
opbutt4 = true;
}
if( (x > 230 && y > 110) && (x < (230 + 45) && y < (110 + 30)) ){
opbutt5 = true;
}
if( (x > 285 && y > 110) && (x < (285 + 45) && y < (110 + 30)) ){
opbutt6 = true;
}
//Middle Line
if( (x > 10 && y > 250) && (x < (10 + 45) && y < (250 + 30)) ){
opbutt7 = true;
}
if( (x > 65 && y > 250) && (x < (65 + 45) && y < (250 + 30)) ){
opbutt8 = true;
}
if( (x > 120 && y > 250) && (x < (120 + 45) && y < (250 + 30)) ){
opbutt9 = true;
}
if( (x > 175 && y > 250) && (x < (175 + 45) && y < (250 + 30)) ){
opbutt10 = true;
}
if( (x > 230 && y > 250) && (x < (230 + 45) && y < (250 + 30)) ){
opbutt11 = true;
}
if( (x > 285 && y > 250) && (x < (285 + 45) && y < (250 + 30)) ){
opbutt12 = true;
}
//Bottom Line
if( (x > 10 && y > 390) && (x < (10 + 45) && y < (390 + 30)) ){
opbutt13 = true;
}
if( (x > 65 && y > 390) && (x < (65 + 45) && y < (390 + 30)) ){
opbutt14 = true;
}
if( (x > 120 && y > 390) && (x < (120 + 45) && y < (390 + 30)) ){
opbutt15 = true;
}
if( (x > 175 && y > 390) && (x < (175 + 45) && y < (390 + 30)) ){
opbutt16 = true;
}
if( (x > 230 && y > 390) && (x < (230 + 45) && y < (390 + 30)) ){
opbutt17 = true;
}
if( (x > 285 && y > 390) && (x < (285 + 45) && y < (390 + 30)) ){
opbutt18 = true;
}
} }
void MyApp::mouse_moved(int x, int y) { void MyApp::mouse_moved(int x, int y) {
...@@ -64,6 +224,433 @@ void MyApp::mouse_moved(int x, int y) { ...@@ -64,6 +224,433 @@ void MyApp::mouse_moved(int x, int y) {
void MyApp::draw() { void MyApp::draw() {
clear(uwe::Colour::black()); clear(uwe::Colour::black());
//Draws buttons out with draw function and adds O and X
//Top line of tic-tac-toe
//1st Button
if(opbutt1){
set_draw_color(uwe::Colour::blue());
draw_rect_fill(10,110,45,30);
draw_font(font30_,"X",20 ,105);
set_draw_color(uwe::Colour::blue());
draw_rect_fill(65,110,45,30);
draw_font(font30_,"O",75 ,105);
set_draw_color(uwe::Colour::green());
draw_rect_fill(10,10,100,100);
draw_font(font90_,"X",30 ,-10);
char_buttonClicked1 = 'X';
}else if (opbutt2){
set_draw_color(uwe::Colour::blue());
draw_rect_fill(10,110,45,30);
draw_font(font30_,"X",20 ,105);
set_draw_color(uwe::Colour::blue());
draw_rect_fill(65,110,45,30);
draw_font(font30_,"O",75 ,105);
set_draw_color(uwe::Colour::green());
draw_rect_fill(10,10,100,100);
draw_font(font90_,"O",30 ,-10);
char_buttonClicked1 = 'O';
} else{
set_draw_color(uwe::Colour::blue());
draw_rect_fill(10,110,45,30);
draw_font(font30_,"X",20 ,105);
set_draw_color(uwe::Colour::blue());
draw_rect_fill(65,110,45,30);
draw_font(font30_,"O",75 ,105);
set_draw_color(uwe::Colour::green());
draw_rect_fill(10,10,100,100);
char_buttonClicked1 = 'a';
}
//2nd Button
if(opbutt3){
set_draw_color(uwe::Colour::blue());
draw_rect_fill(120,110,45,30);
draw_font(font30_,"X",130 ,105);
set_draw_color(uwe::Colour::blue());
draw_rect_fill(175,110,45,30);
draw_font(font30_,"O",185 ,105);
set_draw_color(uwe::Colour::green());
draw_rect_fill(120,10,100,100);
draw_font(font90_,"X",140 ,-10);
char_buttonClicked2 = 'X';
}else if (opbutt4){
set_draw_color(uwe::Colour::blue());
draw_rect_fill(120,110,45,30);
draw_font(font30_,"X",130 ,105);
set_draw_color(uwe::Colour::blue());
draw_rect_fill(175,110,45,30);
draw_font(font30_,"O",185 ,105);
set_draw_color(uwe::Colour::green());
draw_rect_fill(120,10,100,100);
draw_font(font90_,"O",140 ,-10);
char_buttonClicked2 = 'O';
} else{
set_draw_color(uwe::Colour::blue());
draw_rect_fill(120,110,45,30);
draw_font(font30_,"X",130 ,105);
set_draw_color(uwe::Colour::blue());
draw_rect_fill(175,110,45,30);
draw_font(font30_,"O",185 ,105);
set_draw_color(uwe::Colour::green());
draw_rect_fill(120,10,100,100);
char_buttonClicked1 = 'a';
}
//3rd Button
if(opbutt5){
set_draw_color(uwe::Colour::blue());
draw_rect_fill(230,110,45,30);
draw_font(font30_,"X",240 ,105);
set_draw_color(uwe::Colour::blue());
draw_rect_fill(285,110,45,30);
draw_font(font30_,"O",295 ,105);
set_draw_color(uwe::Colour::green());
draw_rect_fill(230,10,100,100);
draw_font(font90_,"X",250 ,-10);
char_buttonClicked3 = 'X';
}else if (opbutt6){
set_draw_color(uwe::Colour::blue());
draw_rect_fill(230,110,45,30);
draw_font(font30_,"X",240 ,105);
set_draw_color(uwe::Colour::blue());
draw_rect_fill(285,110,45,30);
draw_font(font30_,"O",295 ,105);
set_draw_color(uwe::Colour::green());
draw_rect_fill(230,10,100,100);
draw_font(font90_,"O",250 ,-10);
char_buttonClicked3 = 'O';
} else{
set_draw_color(uwe::Colour::blue());
draw_rect_fill(230,110,45,30);
draw_font(font30_,"X",240 ,105);
set_draw_color(uwe::Colour::blue());
draw_rect_fill(285,110,45,30);
draw_font(font30_,"O",295 ,105);
set_draw_color(uwe::Colour::green());
draw_rect_fill(230,10,100,100);
char_buttonClicked1 = 'a';
}
//Middle line of tic-tac-toe
//4th Button
if(opbutt7){
set_draw_color(uwe::Colour::blue());
draw_rect_fill(10,250,45,30);
draw_font(font30_,"X",20 ,245);
set_draw_color(uwe::Colour::blue());
draw_rect_fill(65,250,45,30);
draw_font(font30_,"O",75 ,245);
set_draw_color(uwe::Colour::green());
draw_rect_fill(10,150,100,100);
draw_font(font90_,"X",30 ,130);
char_buttonClicked4 = 'X';
}else if (opbutt8){
set_draw_color(uwe::Colour::blue());
draw_rect_fill(10,250,45,30);
draw_font(font30_,"X",20 ,245);
set_draw_color(uwe::Colour::blue());
draw_rect_fill(65,250,45,30);
draw_font(font30_,"O",75 ,245);
set_draw_color(uwe::Colour::green());
draw_rect_fill(10,150,100,100);
draw_font(font90_,"O",30 ,130);
char_buttonClicked4 = 'O';
} else{
set_draw_color(uwe::Colour::blue());
draw_rect_fill(10,250,45,30);
draw_font(font30_,"X",20 ,245);
set_draw_color(uwe::Colour::blue());
draw_rect_fill(65,250,45,30);
draw_font(font30_,"O",75 ,245);
set_draw_color(uwe::Colour::green());
draw_rect_fill(10,150,100,100);
char_buttonClicked1 = 'a';
}
//5th Button
if(opbutt9){
set_draw_color(uwe::Colour::blue());
draw_rect_fill(120,250,45,30);
draw_font(font30_,"X",130 ,245);
set_draw_color(uwe::Colour::blue());
draw_rect_fill(175,250,45,30);
draw_font(font30_,"O",185 ,245);
set_draw_color(uwe::Colour::green());
draw_rect_fill(120,150,100,100);
draw_font(font90_,"X",140 ,130);
char_buttonClicked5 = 'X';
}else if (opbutt10){
set_draw_color(uwe::Colour::blue());
draw_rect_fill(120,250,45,30);
draw_font(font30_,"X",130 ,245);
set_draw_color(uwe::Colour::blue());
draw_rect_fill(175,250,45,30);
draw_font(font30_,"O",185 ,245);
set_draw_color(uwe::Colour::green());
draw_rect_fill(120,150,100,100);
draw_font(font90_,"O",140 ,130);
char_buttonClicked5 = 'O';
} else{
set_draw_color(uwe::Colour::blue());
draw_rect_fill(120,250,45,30);
draw_font(font30_,"X",130 ,245);
set_draw_color(uwe::Colour::blue());
draw_rect_fill(175,250,45,30);
draw_font(font30_,"O",185 ,245);
set_draw_color(uwe::Colour::green());
draw_rect_fill(120,150,100,100);
char_buttonClicked1 = 'a';
}
//6th Button
if(opbutt11){
set_draw_color(uwe::Colour::blue());
draw_rect_fill(230,250,45,30);
draw_font(font30_,"X",240 ,245);
set_draw_color(uwe::Colour::blue());
draw_rect_fill(285,250,45,30);
draw_font(font30_,"O",295 ,245);
set_draw_color(uwe::Colour::green());
draw_rect_fill(230,150,100,100);
draw_font(font90_,"X",250 ,130);
char_buttonClicked6 = 'X';
}else if (opbutt12){
set_draw_color(uwe::Colour::blue());
draw_rect_fill(230,250,45,30);
draw_font(font30_,"X",240 ,245);
set_draw_color(uwe::Colour::blue());
draw_rect_fill(285,250,45,30);
draw_font(font30_,"O",295 ,245);
set_draw_color(uwe::Colour::green());
draw_rect_fill(230,150,100,100);
draw_font(font90_,"O",250 ,130);
char_buttonClicked6 = 'O';
} else{
set_draw_color(uwe::Colour::blue());
draw_rect_fill(230,250,45,30);
draw_font(font30_,"X",240 ,245);
set_draw_color(uwe::Colour::blue());
draw_rect_fill(285,250,45,30);
draw_font(font30_,"O",295 ,245);
set_draw_color(uwe::Colour::green());
draw_rect_fill(230,150,100,100);
char_buttonClicked1 = 'a';
}
//Bottom Line
//7th Button
if(opbutt13){
set_draw_color(uwe::Colour::blue());
draw_rect_fill(10,390,45,30);
draw_font(font30_,"X",20 ,385);
set_draw_color(uwe::Colour::blue());
draw_rect_fill(65,390,45,30);
draw_font(font30_,"O",75 ,385);
set_draw_color(uwe::Colour::green());
draw_rect_fill(10,290,100,100);
draw_font(font90_,"X",30 ,270);
char_buttonClicked7 = 'X';
}else if (opbutt14){
set_draw_color(uwe::Colour::blue());
draw_rect_fill(10,390,45,30);
draw_font(font30_,"X",20 ,385);
set_draw_color(uwe::Colour::blue());
draw_rect_fill(65,390,45,30);
draw_font(font30_,"O",75 ,385);
set_draw_color(uwe::Colour::green());
draw_rect_fill(10,290,100,100);
draw_font(font90_,"O",30 ,270);
char_buttonClicked7 = 'O';
} else{
set_draw_color(uwe::Colour::blue());
draw_rect_fill(10,390,45,30);
draw_font(font30_,"X",20 ,385);
set_draw_color(uwe::Colour::blue());
draw_rect_fill(65,390,45,30);
draw_font(font30_,"O",75 ,385);
set_draw_color(uwe::Colour::green());
draw_rect_fill(10,290,100,100);
char_buttonClicked1 = 'a';
}
//8th Button
if(opbutt15){
set_draw_color(uwe::Colour::blue());
draw_rect_fill(120,390,45,30);
draw_font(font30_,"X",130 ,385);
set_draw_color(uwe::Colour::blue());
draw_rect_fill(175,390,45,30);
draw_font(font30_,"O",185 ,385);
set_draw_color(uwe::Colour::green());
draw_rect_fill(120,290,100,100);
draw_font(font90_,"X",140 ,270);
char_buttonClicked8 = 'X';
}else if (opbutt16){
set_draw_color(uwe::Colour::blue());
draw_rect_fill(120,390,45,30);
draw_font(font30_,"X",130 ,385);
set_draw_color(uwe::Colour::blue());
draw_rect_fill(175,390,45,30);
draw_font(font30_,"O",185 ,385);
set_draw_color(uwe::Colour::green());
draw_rect_fill(120,290,100,100);
draw_font(font90_,"O",140 ,270);
char_buttonClicked8 = 'O';
} else{
set_draw_color(uwe::Colour::blue());
draw_rect_fill(120,390,45,30);
draw_font(font30_,"X",130 ,385);
set_draw_color(uwe::Colour::blue());
draw_rect_fill(175,390,45,30);
draw_font(font30_,"O",185 ,385);
set_draw_color(uwe::Colour::green());
draw_rect_fill(120,290,100,100);
char_buttonClicked1 = 'a';
}
//9th Button
if(opbutt17){
set_draw_color(uwe::Colour::blue());
draw_rect_fill(230,390,45,30);
draw_font(font30_,"X",240 ,385);
set_draw_color(uwe::Colour::blue());
draw_rect_fill(285,390,45,30);
draw_font(font30_,"O",295 ,385);
set_draw_color(uwe::Colour::green());
draw_rect_fill(230,290,100,100);
draw_font(font90_,"X",250 ,270);
char_buttonClicked9 = 'X';
}else if (opbutt18){
set_draw_color(uwe::Colour::blue());
draw_rect_fill(230,390,45,30);
draw_font(font30_,"X",240 ,385);
set_draw_color(uwe::Colour::blue());
draw_rect_fill(285,390,45,30);
draw_font(font30_,"O",295 ,385);
set_draw_color(uwe::Colour::green());
draw_rect_fill(230,290,100,100);
draw_font(font90_,"O",250 ,270);
char_buttonClicked9 = 'O';
} else{
set_draw_color(uwe::Colour::blue());
draw_rect_fill(230,390,45,30);
draw_font(font30_,"X",240 ,385);
set_draw_color(uwe::Colour::blue());
draw_rect_fill(285,390,45,30);
draw_font(font30_,"O",295 ,385);
set_draw_color(uwe::Colour::green());
draw_rect_fill(230,290,100,100);
char_buttonClicked1 = 'a';
}
//Winner Screen
if (winner >= 1){
set_draw_color(uwe::Colour::red());
draw_rect_fill(50,50,250,250);
draw_font(font30blue_,"Winner",100,100);
}
} }
int main(int argc, char *argv[]) { int main(int argc, char *argv[]) {
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
#include <iomanip> #include <iomanip>
#include <vector> #include <vector>
#include <cstring> #include <cstring>
#include <context.hpp> #include <context.hpp>
#include <app.hpp> #include <app.hpp>
......
File added