emailed my lecturer and he said 2 bytes is all u need 1 for each position 1 for each symbol, however 9 squares 9 potential symbols 9x9 = 18 thats 2 bytes and 2 bits?
Type: Posts; User: bdillion
emailed my lecturer and he said 2 bytes is all u need 1 for each position 1 for each symbol, however 9 squares 9 potential symbols 9x9 = 18 thats 2 bytes and 2 bits?
hey
bits[0];
bits[1];
bits[2];
purpose was i thought they acted like as if the numbers were there position in the array
and yes the number of bits was wrong i forgot it starts at 0
this is my code so far
i set a bit array for position and one for x or 0 however it seems to think there is somthing in the board position even when theres not, its going to be a long night
...
yeah its suppose to be tic tac toe, most of it was pre-coded which makes it more difficult as i can never see what he's doing with his code
ok i appolgise, moving on
i was sent some hint sheets today because the amount of people complaining, and there vastly different from what we have discussed.
Im reading them atm will get back...
another thrilling wrong addition by yourself there i think i proved my own point that your too up yourself to accept criticism yourself. I'm sure your go far with that attitude
I accept criticism however you are not helping your being an elitist prick, the other people in this thread are more than willing to explain it in terms i understand that i thank them for it so just...
i am not simply glossing over it, your speaking to me as if i've been coding for years which i have no. I do not gloss over your suggestions i just dont understand you, dont misinterpret what i say....
with this method can i pack the whole thing ? i mean how does the fields know whats in them without logic like that
jeffcobb-
just trying out your idea, when you set if its true or false
playState.Field00 = true;
is there a way i can find out what is x and what is o before. i tried
if (board[0] ==...
ok i understand the concept how how its trying to work all x and o are given a number x = 1 0= 0 anbd the position is also given a number 1= full 0= empty so x in position xero would be 11 and if no...
unfortunately i dont have time to read a c++ book we've been given 4 days to do this, we were taught very badly c++ this year and were expected to do this after about 5 hours of coding.
so im am...
also i incorporated the example and it seems to think everything is an x
public:
int field;
bitwiseNoughtsAndCrosses () { };
bool check (int flag) {
if (field & flag) return...
but then how do i know how to pack them all im getting is outputs to the screen saying this is x this o, im really lost.
I dont know i'm just using the code provided and trying to do what im told, i have 0 idea what im doing and i think i might fail this tbh i just dont understand it how you pack it and send it
i just looked at the example, but i dont understand how that packing them as bits to send?
nothing but the derived class can be changed the other functions and classes above are prewritten for us
#include "stdafx.h"
#include <stdio.h>
#include <winsock2.h>
#include <ws2tcpip.h>
#include <iostream>
#include <ctime>
#include <math.h>
#include <iostream>
#include <vector>
//#define...
i'm working in server but have added both server and client so u can see whats happening the only class i can change is the main and dirvied class in server otherwise i would try changing the way the...
i've set it and the board is in an array called board
#define SQUARE_NULL 0
#define SQUARE_X 1
#define SQUARE_O 2
then tested it
board[1] |= SQUARE_X;
if (board[1] &= SQUARE_X)
sorry had to make a new account mine doesn't work for some reason.
The purpose it just to show it can be done. Basically its a network game of 0 and X's with a 3x3 grid. the server and client take...