12-8-2010, 10:12 AM | #41 |
x'); DROP TABLE FFR;--
Join Date: Nov 2010
Posts: 6,332
|
Re: Complain about finals thread
your avatar is profound
|
12-8-2010, 10:22 AM | #42 |
Digital Dancing!
Join Date: Feb 2006
Location: 80 billion club, NE
Age: 31
Posts: 12,980
|
Re: Complain about finals thread
OH SHIT MY HISTORY FINAL IS TODAY!
*screwed kjfldjsa;lfks;lfjaskf;sd
__________________
|
12-8-2010, 10:37 AM | #43 |
caveman pornstar
|
Re: Complain about finals thread
German final in 25 minutes -- just a presentation and turning about 80 things in, shouldn't be too bad.
World Cinema final Thursday -- also shouldn't be too bad, just lots of vocab to learn Sociology Monday -- easy class, exam comes from previous tests Modern Algebra Tuesday -- this one will be a bitch and a research paper due Tuesday as well, which I just need to revise some more, but most of the actual work is already done
__________________
http://www.youtube.com/watch?v=IREnpHco9mw |
12-8-2010, 05:52 PM | #44 |
Forum User
Join Date: Jun 2009
Location: Houston
Age: 19
Posts: 2,964
|
Re: Complain about finals thread
My lil bro missed a final that was for yesterday. He's lucky He's getting a 2nd chance.
|
12-8-2010, 05:56 PM | #45 |
FFR Player
Join Date: Jun 2006
Location: New York
Age: 35
Posts: 1,276
|
Re: Complain about finals thread
My friend has been "borrowing" my behavior modification text book for months. The final is Tuesday. We met up today to study. All she did was talk about her boyfriend and how badly she had to take a ****. I wish I was kidding. When she ran off to go to the bathroom (went to a mysterious private bathroom) she took my textbook. I could not go find her because A. I did not know where the mysterious bathroom was and B. I didn't want to walk in on her taking a ****. The final is Tuesday. I don't have my textbook. I cannot study. FML
__________________
The weight of what I say depends on how you feel. Last edited by Rubin0; 12-8-2010 at 05:58 PM.. |
12-8-2010, 06:56 PM | #46 |
Dark Chancellor
|
Re: Complain about finals thread
I aced college and graduated quit stressing ya nerds
__________________
|
12-8-2010, 08:13 PM | #47 |
mmmMMMmmm
Join Date: Apr 2007
Location: California
Age: 36
Posts: 521
|
Re: Complain about finals thread
It sucks to have a final for an internet class. You have to hope that your connection doesn't go out during the final. A friend told me an experience in which he accidentally pressed the close button, but fortunately was able to continue. That's why I'll never take an internet class unless I really have to.
__________________
IF I CAN CLIMB A TREE, I CAN CLIMB MT EVEREST. IF I CAN DRIVE A CAR, I CAN PILOT A SPACE SHUTTLE. IF I CAN PEE, I CAN BE THE PRESIDENT. IF I CAN POO, I CAN RULE THE WORLD! Last edited by MarukuAntoni; 12-8-2010 at 08:15 PM.. |
12-8-2010, 08:18 PM | #48 |
Don't forget me
Join Date: Jan 2007
Location: USA
Age: 31
Posts: 6,491
|
Re: Complain about finals thread
only one im nervous about it pre-calc, but thats no big deal because i could care less
__________________
|
12-8-2010, 08:22 PM | #49 |
~
Join Date: Oct 2010
Location: Sacramento
Age: 29
Posts: 730
|
Re: Complain about finals thread
I have a book report due next monday ):
Finals will be easy this year actually. It's only 3 days and we get out at 11:50 a.m. on those days. Wednesday: fashion design, english Thursday: culinary, office aide Friday: alt. pe, american history
__________________
~ |
12-8-2010, 08:34 PM | #50 | |
Forum User
Join Date: Jun 2009
Location: Houston
Age: 19
Posts: 2,964
|
Re: Complain about finals thread
Quote:
I believe this thread is for college students. |
|
12-8-2010, 08:44 PM | #51 |
FFR Player
Join Date: Jun 2006
Location: New York
Age: 35
Posts: 1,276
|
Re: Complain about finals thread
Do you go to a home economics school...are they training you to be a house wife? No. Seriously.
__________________
The weight of what I say depends on how you feel. |
12-8-2010, 08:49 PM | #52 | |
Supreme Dictator For Life
|
Re: Complain about finals thread
Actually yeah I'm confused. No math? No science?
__________________
Back to "Back to Earth" Quote:
|
|
12-8-2010, 08:52 PM | #53 |
~
Join Date: Oct 2010
Location: Sacramento
Age: 29
Posts: 730
|
Re: Complain about finals thread
Oh i thought it was for finals in general
I took bio and geometry freshman year, chem and algebra 2 my sophomore, and i don't think i'm taking anymore because i don't need to.
__________________
~ |
12-8-2010, 08:55 PM | #54 |
FFR Veteran
|
Re: Complain about finals thread
accounting final sometime next week- won't be hard.
business final sometime next week- won't be hard. pysch final already got an A science final sometime next week- going to get raped. |
12-8-2010, 09:13 PM | #55 | ||
Supreme Dictator For Life
|
Re: Complain about finals thread
Quote:
And it is for finals in general. That guy doesn't know what he's talking about.
__________________
Back to "Back to Earth" Quote:
|
||
12-8-2010, 09:23 PM | #56 |
~
Join Date: Oct 2010
Location: Sacramento
Age: 29
Posts: 730
|
Re: Complain about finals thread
Oh okay. All four years of science and math is required for a csu i believe. But i don't plan on going to sac state or something big, i just want to start off at a community college first.
|
12-8-2010, 09:27 PM | #57 |
om nom nom
|
Re: Complain about finals thread
Just finished my Microbiology Exam. Blah. 4 hours, not fun. What kind of micro exam has two essays on it?
Biochem 9AM tomorrow. Haven't studied much. Whoops. Then Environmental History on Sat. Kinda cool. |
12-8-2010, 10:44 PM | #58 |
FFR Player
|
Re: Complain about finals thread
I'm a TA for a couple of media classes, so I also have to grade 110 5-page papers... wee.
|
12-9-2010, 12:41 AM | #59 |
caveman pornstar
|
Re: Complain about finals thread
It's all the state. In NC we needed 3 math classes and 3 science minimum to graduate. The only thing you had to take all four years was English. If you want to get into a university, you basically have to take 4 of each, but it's not necessarily required to graduate.
__________________
http://www.youtube.com/watch?v=IREnpHco9mw |
12-9-2010, 12:43 AM | #60 |
Snek
Join Date: Jan 2003
Location: Kansas
Age: 34
Posts: 9,192
|
Re: Complain about finals thread
At least my final game project is coming along nicely. Spiffy looking. It is a multiplayer or singleplayer + AI tron type game. I don't recommend trying to read this horrendous source code. Code:
using System; using System.Collections.Generic; using System.Linq; using System.Timers; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Audio; using Microsoft.Xna.Framework.Content; using Microsoft.Xna.Framework.GamerServices; using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Input; using Microsoft.Xna.Framework.Media; namespace Cube_Vector { /// This is the main type for your game public class cubeVector : Microsoft.Xna.Framework.Game { // Game variables GraphicsDeviceManager graphics; SpriteBatch spriteBatch; ContentManager contentManager; Vector2 zero = new Vector2(0, 0); static int gameWidth = 1024; static int gameHeight = 768; static int tileSize = 16; string currentState; static string[] states = new string[] { "splash", "menu", "scoreboard", "singleplayer", "multiplayer", "results" }; static string[] directions = new string[] {"left", "down", "up", "right"}; Timer splashTimer = new Timer(3000); Timer resultsTimer = new Timer(5000); Timer gameTimer = new Timer(35); string winner; SpriteFont scoreFont; // Input States const int MaxInputs = 4; KeyboardState[] CurrentKeyboardStates; GamePadState[] CurrentGamePadStates; KeyboardState[] LastKeyboardStates; GamePadState[] LastGamePadStates; bool[] GamePadWasConnected; // Gameboards int[,] gameBoard = new int[gameWidth / tileSize, gameHeight / tileSize]; Vector2[,] vectorBoard = new Vector2[gameWidth / tileSize, gameHeight / tileSize]; // Scoreboard string[] scoreBoard; // Textures Texture2D playerOneTile; Texture2D playerTwoTile; Texture2D playerThreeTile; Texture2D playerFourTile; Texture2D backgroundTile; Texture2D obstacleTile; Texture2D splashImage; Texture2D menuBackground; Texture2D gameBackground; Texture2D defaultBackground; // Player variables string playerOneDirection; string playerTwoDirection; string playerThreeDirection; string playerFourDirection; Vector2 playerOnePosition = new Vector2(0, 0); Vector2 playerTwoPosition = new Vector2(0, 0); Vector2 playerThreePosition = new Vector2(0, 0); Vector2 playerFourPosition = new Vector2(0, 0); bool playerOneAlive; bool playerTwoAlive; bool playerThreeAlive; bool playerFourAlive; // Colors Color playerOneColor = new Color(255, 172, 174); Color playerTwoColor = new Color(195, 234, 255); Color playerThreeColor = new Color(207, 255, 159); Color playerFourColor = new Color(255, 242, 132); Color defaultColor = new Color(158, 118, 92); // CPU player string computerDirection; Vector2 computerPosition = new Vector2(0, 0); bool computerAlive; // Game constructor public cubeVector() { graphics = new GraphicsDeviceManager(this); Content.RootDirectory = "Content"; // Change the game resolution graphics.PreferredBackBufferWidth = gameWidth; graphics.PreferredBackBufferHeight = gameHeight; graphics.ApplyChanges(); // Start game on splash screen currentState = states[0]; splashTimer.Start(); splashTimer.Elapsed += new ElapsedEventHandler(splashTimer_Tick); // Set timer event handlers gameTimer.Elapsed += new ElapsedEventHandler(gameTimer_Tick); resultsTimer.Elapsed += new ElapsedEventHandler(resultsTimer_Tick); } // Initialize game variables protected override void Initialize() { // Initialize input states CurrentKeyboardStates = new KeyboardState[MaxInputs]; CurrentGamePadStates = new GamePadState[MaxInputs]; LastKeyboardStates = new KeyboardState[MaxInputs]; LastGamePadStates = new GamePadState[MaxInputs]; GamePadWasConnected = new bool[MaxInputs]; GamePadWasConnected[2] = true; GamePadWasConnected[3] = true; // Set starting directions of players playerOneDirection = directions[1]; playerTwoDirection = directions[2]; playerThreeDirection = directions[0]; playerFourDirection = directions[3]; computerDirection = directions[2]; // Set positions of players playerOnePosition = new Vector2(0, 0); playerTwoPosition = new Vector2(gameWidth - tileSize, gameHeight - tileSize); playerThreePosition = new Vector2(gameWidth - tileSize, 0); playerFourPosition = new Vector2(0, gameHeight - tileSize); computerPosition = new Vector2(gameWidth - tileSize, gameHeight - tileSize); // Set player state playerOneAlive = true; playerTwoAlive = true; playerThreeAlive = true; playerFourAlive = true; computerAlive = true; winner = "undefined"; // Create out game board generateGameBoard(); base.Initialize(); } // Load our images and audio protected override void LoadContent() { contentManager = new ContentManager(this.Services, "Content"); spriteBatch = new SpriteBatch(GraphicsDevice); // Load our images playerOneTile = contentManager.Load<Texture2D>("Player1"); playerTwoTile = contentManager.Load<Texture2D>("Player2"); playerThreeTile = contentManager.Load<Texture2D>("Player3"); playerFourTile = contentManager.Load<Texture2D>("Player4"); backgroundTile = contentManager.Load<Texture2D>("Background"); obstacleTile = contentManager.Load<Texture2D>("Obstacle"); splashImage= contentManager.Load<Texture2D>("Splash"); menuBackground = contentManager.Load<Texture2D>("Menu"); gameBackground = contentManager.Load<Texture2D>("GameBackground"); defaultBackground= contentManager.Load<Texture2D>("Grey"); // Load our fonts scoreFont = contentManager.Load<SpriteFont>("ScoreFont"); } // Unload our images and audio protected override void UnloadContent() { // TODO: Unload any non ContentManager content here } // Manage game logic that will be calculated constantly protected override void Update(GameTime gameTime) { // Update input states for (int i = 0; i < MaxInputs; i++) { LastKeyboardStates[i] = CurrentKeyboardStates[i]; LastGamePadStates[i] = CurrentGamePadStates[i]; CurrentKeyboardStates[i] = Keyboard.GetState((PlayerIndex)i); CurrentGamePadStates[i] = GamePad.GetState((PlayerIndex)i); if (CurrentGamePadStates[i].IsConnected) { GamePadWasConnected[i] = true; } } HandleInput(); if (gameOverCheck()) { winner = winnerCheck(); gameTimer.Stop(); resultsTimer.Start(); currentState = states[5]; } base.Update(gameTime); } // Draw the game protected override void Draw(GameTime gameTime) { GraphicsDevice.Clear(Color.Black); // Splash screen draw if (currentState == states[0]) { spriteBatch.Begin(); spriteBatch.Draw(splashImage, zero, Color.White); spriteBatch.End(); } // Menu screen draw if (currentState == states[1]) { spriteBatch.Begin(); spriteBatch.Draw(menuBackground, zero, Color.White); spriteBatch.End(); } // Scoreboard screen draw if (currentState == states[2]) { spriteBatch.Begin(); spriteBatch.Draw(defaultBackground, zero, Color.White); spriteBatch.End(); } // Singleplayer game darw if (currentState == states[3]) { spriteBatch.Begin(); spriteBatch.Draw(gameBackground, zero, Color.White); for (int i = 0; i < gameWidth / tileSize; i++) { for (int j = 0; j < gameHeight / tileSize; j++) { if (gameBoard[i, j] == 1) { if (playerOneAlive) { spriteBatch.Draw(playerOneTile, vectorBoard[i, j], Color.White); } else { spriteBatch.Draw(obstacleTile, vectorBoard[i, j], Color.White); } } if (gameBoard[i, j] == 6) { if (computerAlive) { spriteBatch.Draw(playerTwoTile, vectorBoard[i, j], Color.White); } else { spriteBatch.Draw(obstacleTile, vectorBoard[i, j], Color.White); } } if (gameBoard[i, j] == 5) { spriteBatch.Draw(obstacleTile, vectorBoard[i, j], Color.White); } } } spriteBatch.End(); } // Multiplayer game draw if (currentState == states[4]) { spriteBatch.Begin(); spriteBatch.Draw(gameBackground, zero, Color.White); for (int i = 0; i < gameWidth / tileSize; i++) { for (int j = 0; j < gameHeight / tileSize; j++) { if (gameBoard[i, j] == 1) { if (playerOneAlive) { spriteBatch.Draw(playerOneTile, vectorBoard[i, j], Color.White); } else { spriteBatch.Draw(obstacleTile, vectorBoard[i, j], Color.White); } } if (gameBoard[i, j] == 2) { if (playerTwoAlive) { spriteBatch.Draw(playerTwoTile, vectorBoard[i, j], Color.White); } else { spriteBatch.Draw(obstacleTile, vectorBoard[i, j], Color.White); } } if (gameBoard[i, j] == 3 && GamePadWasConnected[2]) { if (playerThreeAlive) { spriteBatch.Draw(playerThreeTile, vectorBoard[i, j], Color.White); } else { spriteBatch.Draw(obstacleTile, vectorBoard[i, j], Color.White); } } if (gameBoard[i, j] == 4 && GamePadWasConnected[3]) { if (playerFourAlive) { spriteBatch.Draw(playerFourTile, vectorBoard[i, j], Color.White); } else { spriteBatch.Draw(obstacleTile, vectorBoard[i, j], Color.White); } } if (gameBoard[i, j] == 5) { spriteBatch.Draw(obstacleTile, vectorBoard[i, j], Color.White); } } } spriteBatch.End(); } // Results screen draw if (currentState == states[5]) { string resultsString = winner; spriteBatch.Begin(); if (winner != "Tie Game") { resultsString = winner + " is the winner"; } spriteBatch.Draw(menuBackground, zero, Color.White); Vector2 resultsPosition = new Vector2(gameWidth / 2, gameHeight / 2); Vector2 resultsOrigin = scoreFont.MeasureString(resultsString) / 2; if (winner == "Player One") { spriteBatch.DrawString(scoreFont, Convert.ToString(resultsString), resultsPosition, playerOneColor, 0, resultsOrigin, 1.0f, SpriteEffects.None, 0.5f); } if (winner == "Player Two") { spriteBatch.DrawString(scoreFont, Convert.ToString(resultsString), resultsPosition, playerTwoColor, 0, resultsOrigin, 1.0f, SpriteEffects.None, 0.5f); } if (winner == "Player Three") { spriteBatch.DrawString(scoreFont, Convert.ToString(resultsString), resultsPosition, playerThreeColor, 0, resultsOrigin, 1.0f, SpriteEffects.None, 0.5f); } if (winner == "Player Four") { spriteBatch.DrawString(scoreFont, Convert.ToString(resultsString), resultsPosition, playerFourColor, 0, resultsOrigin, 1.0f, SpriteEffects.None, 0.5f); } if (winner == "Computer") { spriteBatch.DrawString(scoreFont, Convert.ToString(resultsString), resultsPosition, playerTwoColor, 0, resultsOrigin, 1.0f, SpriteEffects.None, 0.5f); } if (winner == "Tie Game") { spriteBatch.DrawString(scoreFont, Convert.ToString(resultsString), resultsPosition, defaultColor, 0, resultsOrigin, 1.0f, SpriteEffects.None, 0.5f); } spriteBatch.End(); } base.Draw(gameTime); } // Handles the input of all players protected void HandleInput() { // Splash screen input if (currentState == states[0]) { if (IsNewButtonPress(Buttons.Start, 1) || IsNewKeyPress(Keys.Space, 1)) { currentState = states[1]; splashTimer.Stop(); } } // Menu screen input if (currentState == states[1]) { if (IsNewButtonPress(Buttons.DPadDown, 1) || IsNewKeyPress(Keys.F1, 1)) { currentState = states[3]; gameTimer.Start(); } if (IsNewButtonPress(Buttons.DPadUp, 1) || IsNewKeyPress(Keys.F2, 1)) { currentState = states[4]; gameTimer.Start(); } } // Scoreboard screen input if (currentState == states[2]) { } // Singleplayer game input if (currentState == states[3]) { // Player one input if (IsNewButtonPress(Buttons.LeftThumbstickLeft, 0) || IsNewKeyPress(Keys.A, 1)){ if (playerOneDirection != directions[3]){playerOneDirection = directions[0];}} if (IsNewButtonPress(Buttons.LeftThumbstickDown, 0) || IsNewKeyPress(Keys.S, 1)){ if (playerOneDirection != directions[2]){playerOneDirection = directions[1];}} if (IsNewButtonPress(Buttons.LeftThumbstickUp, 0) || IsNewKeyPress(Keys.W, 1)){ if (playerOneDirection != directions[1]){playerOneDirection = directions[2];}} if (IsNewButtonPress(Buttons.LeftThumbstickRight, 0) || IsNewKeyPress(Keys.D, 1)){ if (playerOneDirection != directions[0]){playerOneDirection = directions[3];}} } // Multiplayer game input if (currentState == states[4]) { // Player one input if (IsNewButtonPress(Buttons.LeftThumbstickLeft, 0) || IsNewKeyPress(Keys.A, 1)){ if (playerOneDirection != directions[3]){playerOneDirection = directions[0];}} if (IsNewButtonPress(Buttons.LeftThumbstickDown, 0) || IsNewKeyPress(Keys.S, 1)){ if (playerOneDirection != directions[2]){playerOneDirection = directions[1];}} if (IsNewButtonPress(Buttons.LeftThumbstickUp, 0) || IsNewKeyPress(Keys.W, 1)){ if (playerOneDirection != directions[1]){playerOneDirection = directions[2];}} if (IsNewButtonPress(Buttons.LeftThumbstickRight, 0) || IsNewKeyPress(Keys.D, 1)){ if (playerOneDirection != directions[0]){playerOneDirection = directions[3];}} // Player two input if (IsNewButtonPress(Buttons.LeftThumbstickLeft, 1) || IsNewKeyPress(Keys.F, 1)){ if (playerTwoDirection != directions[3]){playerTwoDirection = directions[0];}} if (IsNewButtonPress(Buttons.LeftThumbstickDown, 1) || IsNewKeyPress(Keys.G, 1)){ if (playerTwoDirection != directions[2]){playerTwoDirection = directions[1];}} if (IsNewButtonPress(Buttons.LeftThumbstickUp, 1) || IsNewKeyPress(Keys.T, 1)){ if (playerTwoDirection != directions[1]){playerTwoDirection = directions[2];}} if (IsNewButtonPress(Buttons.LeftThumbstickRight, 1) || IsNewKeyPress(Keys.H, 1)){ if (playerTwoDirection != directions[0]){playerTwoDirection = directions[3];}} // Player three input if (IsNewButtonPress(Buttons.LeftThumbstickLeft, 2) || IsNewKeyPress(Keys.J, 2)){ if (playerThreeDirection != directions[3]){playerThreeDirection = directions[0];}} if (IsNewButtonPress(Buttons.LeftThumbstickDown, 2) || IsNewKeyPress(Keys.K, 2)){ if (playerThreeDirection != directions[2]){playerThreeDirection = directions[1];}} if (IsNewButtonPress(Buttons.LeftThumbstickUp, 2) || IsNewKeyPress(Keys.I, 2)){ if (playerThreeDirection != directions[1]){playerThreeDirection = directions[2];}} if (IsNewButtonPress(Buttons.LeftThumbstickRight, 2) || IsNewKeyPress(Keys.L, 2)){ if (playerThreeDirection != directions[0]){playerThreeDirection = directions[3];}} // Player four input if (IsNewButtonPress(Buttons.LeftThumbstickLeft, 3) || IsNewKeyPress(Keys.NumPad1, 3)){ if (playerFourDirection != directions[3]){playerFourDirection = directions[0];}} if (IsNewButtonPress(Buttons.LeftThumbstickDown, 3) || IsNewKeyPress(Keys.NumPad2, 3)){ if (playerFourDirection != directions[2]){playerFourDirection = directions[1];}} if (IsNewButtonPress(Buttons.LeftThumbstickUp, 3) || IsNewKeyPress(Keys.NumPad5, 3)){ if (playerFourDirection != directions[1]){playerFourDirection = directions[2];}} if (IsNewButtonPress(Buttons.LeftThumbstickRight, 3) || IsNewKeyPress(Keys.NumPad3, 3)){ if (playerFourDirection != directions[0]){playerFourDirection = directions[3];}} } // Results screen input if (currentState == states[5]) { if (IsNewButtonPress(Buttons.A, 1) || IsNewButtonPress(Buttons.Start, 1) || IsNewKeyPress(Keys.Space, 1)) { resultsTimer.Stop(); Initialize(); currentState = states[1]; } } } // Timer for the splash screen private void splashTimer_Tick(object sender, EventArgs e) { currentState = states[1]; splashTimer.Stop(); } // Updates the game board every tick private void gameTimer_Tick(object sender, EventArgs e) { // Singleplayer game input if (currentState == states[3]) { if(playerOneAlive) { int x1 = Convert.ToInt32(playerOnePosition.X / tileSize); int y1 = Convert.ToInt32(playerOnePosition.Y / tileSize); gameBoard[x1, y1] = 1; if (playerOneDirection == directions[0]){if (!((x1 - 1) * tileSize < 0)){ if (!collisionCheck(x1 - 1, y1)) { playerOnePosition = vectorBoard[x1 - 1, y1]; } else { playerOneAlive = false; }}else{playerOneAlive = false;}} if (playerOneDirection == directions[1]){if (!((y1 + 1) * tileSize > gameHeight - tileSize)){ if (!collisionCheck(x1, y1 + 1)) { playerOnePosition = vectorBoard[x1, y1 + 1]; } else { playerOneAlive = false; }}else{playerOneAlive = false;}} if (playerOneDirection == directions[2]){if (!((y1 - 1) * tileSize < 0)){ if (!collisionCheck(x1, y1 - 1)) { playerOnePosition = vectorBoard[x1, y1 - 1]; } else { playerOneAlive = false; }}else{playerOneAlive = false;}} if (playerOneDirection == directions[3]){if (!((x1 + 1) * tileSize > gameWidth - tileSize)){ if (!collisionCheck(x1 + 1, y1)) { playerOnePosition = vectorBoard[x1 + 1, y1]; } else { playerOneAlive = false; }}else{playerOneAlive = false;}} } if (computerAlive) { int x2 = Convert.ToInt32(computerPosition.X / tileSize); int y2 = Convert.ToInt32(computerPosition.Y / tileSize); gameBoard[x2, y2] = 6; if (computerDirection == directions[0]){if (!((x2 - 1) * tileSize < 0)){ if (!collisionCheck(x2 - 1, y2)) { computerPosition = vectorBoard[x2 - 1, y2]; } else { computerAlive = false; }}else{computerAlive = false;}} if (computerDirection == directions[1]){if (!((y2 + 1) * tileSize > gameHeight - tileSize)){ if (!collisionCheck(x2, y2 + 1)) { computerPosition = vectorBoard[x2, y2 + 1]; } else { computerAlive = false; }}else{computerAlive = false;}} if (computerDirection == directions[2]){if (!((y2 - 1) * tileSize < 0)){ if (!collisionCheck(x2, y2 - 1)) { computerPosition = vectorBoard[x2, y2 - 1]; } else { computerAlive = false; }}else{computerAlive = false;}} if (computerDirection == directions[3]){if (!((x2 + 1) * tileSize > gameWidth - tileSize)){ if (!collisionCheck(x2 + 1, y2)) { computerPosition = vectorBoard[x2 + 1, y2]; } else { computerAlive = false; }}else{computerAlive = false;}} } } // Multiplayer game input if (currentState == states[4]) { // Player one if(playerOneAlive) { int x1 = Convert.ToInt32(playerOnePosition.X / tileSize); int y1 = Convert.ToInt32(playerOnePosition.Y / tileSize); gameBoard[x1, y1] = 1; if (playerOneDirection == directions[0]){if (!((x1 - 1) * tileSize < 0)){ if (!collisionCheck(x1 - 1, y1)) { playerOnePosition = vectorBoard[x1 - 1, y1]; } else { playerOneAlive = false; }}else{playerOneAlive = false;}} if (playerOneDirection == directions[1]){if (!((y1 + 1) * tileSize > gameHeight - tileSize)){ if (!collisionCheck(x1, y1 + 1)) { playerOnePosition = vectorBoard[x1, y1 + 1]; } else { playerOneAlive = false; }}else{playerOneAlive = false;}} if (playerOneDirection == directions[2]){if (!((y1 - 1) * tileSize < 0)){ if (!collisionCheck(x1, y1 - 1)) { playerOnePosition = vectorBoard[x1, y1 - 1]; } else { playerOneAlive = false; }}else{playerOneAlive = false;}} if (playerOneDirection == directions[3]){if (!((x1 + 1) * tileSize > gameWidth - tileSize)){ if (!collisionCheck(x1 + 1, y1)) { playerOnePosition = vectorBoard[x1 + 1, y1]; } else { playerOneAlive = false; }}else{playerOneAlive = false;}} } // Player two int x2 = Convert.ToInt32(playerTwoPosition.X / tileSize); int y2 = Convert.ToInt32(playerTwoPosition.Y / tileSize); gameBoard[x2, y2] = 2; if (playerTwoDirection == directions[0]){if (!((x2 - 1) * tileSize < 0)){ if (!collisionCheck(x2 - 1, y2)) { playerTwoPosition = vectorBoard[x2 - 1, y2]; } else { playerTwoAlive = false; }}else{playerTwoAlive = false;}} if (playerTwoDirection == directions[1]){if (!((y2 + 1) * tileSize > gameHeight - tileSize)){ if (!collisionCheck(x2, y2 + 1)) { playerTwoPosition = vectorBoard[x2, y2 + 1]; } else { playerTwoAlive = false; }}else{playerTwoAlive = false;}} if (playerTwoDirection == directions[2]){if (!((y2 - 1) * tileSize < 0)){ if (!collisionCheck(x2, y2 - 1)) { playerTwoPosition = vectorBoard[x2, y2 - 1]; } else { playerTwoAlive = false; }}else{playerTwoAlive = false;}} if (playerTwoDirection == directions[3]){if (!((x2 + 1) * tileSize > gameWidth - tileSize)){ if (!collisionCheck(x2 + 1, y2)) { playerTwoPosition = vectorBoard[x2 + 1, y2]; } else { playerTwoAlive = false; }}else{playerTwoAlive = false;}} // Player three if (GamePadWasConnected[2]) { int x3 = Convert.ToInt32(playerThreePosition.X / tileSize); int y3 = Convert.ToInt32(playerThreePosition.Y / tileSize); gameBoard[x3, y3] = 3; if (playerThreeDirection == directions[0]){if (!((x3 - 1) * tileSize < 0)){ if (!collisionCheck(x3 - 1, y3)) { playerThreePosition = vectorBoard[x3 - 1, y3]; } else { playerThreeAlive = false; }}else{playerThreeAlive = false;}} if (playerThreeDirection == directions[1]){if (!((y3 + 1) * tileSize > gameHeight - tileSize)){ if (!collisionCheck(x3, y3 + 1)) { playerThreePosition = vectorBoard[x3, y3 + 1]; } else { playerThreeAlive = false; }}else{playerThreeAlive = false;}} if (playerThreeDirection == directions[2]){if (!((y3 - 1) * tileSize < 0)){ if (!collisionCheck(x3, y3 - 1)) { playerThreePosition = vectorBoard[x3, y3 - 1]; } else { playerThreeAlive = false; }}else{playerThreeAlive = false;}} if (playerThreeDirection == directions[3]){if (!((x3 + 1) * tileSize > gameWidth - tileSize)){ if (!collisionCheck(x3 + 1, y3)) { playerThreePosition = vectorBoard[x3 + 1, y3]; } else { playerThreeAlive = false; }}else{playerThreeAlive = false;}} } // Player four if (GamePadWasConnected[3]) { int x4 = Convert.ToInt32(playerFourPosition.X / tileSize); int y4 = Convert.ToInt32(playerFourPosition.Y / tileSize); gameBoard[x4, y4] = 4; if (playerFourDirection == directions[0]){if (!((x4 - 1) * tileSize < 0)){ if (!collisionCheck(x4 - 1, y4)) { playerFourPosition = vectorBoard[x4 - 1, y4]; } else { playerFourAlive = false; }}else{playerFourAlive = false;}} if (playerFourDirection == directions[1]){if (!((y4 + 1) * tileSize > gameHeight - tileSize)){ if (!collisionCheck(x4, y4 + 1)) { playerFourPosition = vectorBoard[x4, y4 + 1]; } else { playerFourAlive = false; }}else{playerFourAlive = false;}} if (playerFourDirection == directions[2]){if (!((y4 - 1) * tileSize < 0)){ if (!collisionCheck(x4, y4 - 1)) { playerFourPosition = vectorBoard[x4, y4 - 1]; } else { playerFourAlive = false; }}else{playerFourAlive = false;}} if (playerFourDirection == directions[3]){if (!((x4 + 1) * tileSize > gameWidth - tileSize)){ if (!collisionCheck(x4 + 1, y4)) { playerFourPosition = vectorBoard[x4 + 1, y4]; } else { playerFourAlive = false; }}else{playerFourAlive = false;}} } } } // Timer for the score screen private void resultsTimer_Tick(object sender, EventArgs e) { resultsTimer.Stop(); Initialize(); currentState = states[1]; } // Generates the game board private void generateGameBoard() { for (int i = 0; i < gameWidth / tileSize; i++) { for (int j = 0; j < gameHeight / tileSize; j++) { //Change to read from text file gameBoard[i, j] = 0; vectorBoard[i, j] = new Vector2(i * tileSize, j * tileSize); } } } // Checks to see if a collision will take place private bool collisionCheck(int x, int y) { if (gameBoard[x, y] == 0) { return false; } else { return true; } } // Check to see if the game should end public bool gameOverCheck() { int playersRemaining; if (currentState == states[3]) { playersRemaining = 2; if (!playerOneAlive) { playersRemaining--; } if (!computerAlive) { playersRemaining--; } if (playersRemaining <= 1) { return true; } } if (currentState == states[4]) { playersRemaining = 2; if (GamePadWasConnected[2]) { playersRemaining = 3; } if (GamePadWasConnected[3]) { playersRemaining = 4; } if (!playerOneAlive) { playersRemaining--; } if (!playerTwoAlive) { playersRemaining--; } if (!playerThreeAlive && GamePadWasConnected[2]) { playersRemaining--; } if (!playerFourAlive && GamePadWasConnected[3]) { playersRemaining--; } if (playersRemaining <= 1) { return true; } } return false; } // Check to see who the winner of the game is public string winnerCheck() { if (currentState == states[3]) { if (playerOneAlive) { return "Player One"; } else if (computerAlive) { return "Computer"; } else { return "Tie Game"; } } if (currentState == states[4]) { if (playerOneAlive) { return "Player One"; } else if (playerTwoAlive) { return "Player Two"; } else if (playerThreeAlive) { return "Player Three"; } else if (playerFourAlive) { return "Player Four"; } else { return "Tie Game"; } } return "undefined"; } // Checks if a key is a new key press public bool IsNewKeyPress(Keys key, int player) { int i = player; if (CurrentKeyboardStates[i].IsKeyDown(key) && LastKeyboardStates[i].IsKeyUp(key)) { return true; } else { return false; } } // Checks if a button is a new button press public bool IsNewButtonPress(Buttons button, int player) { int i = player; if (CurrentGamePadStates[i].IsButtonDown(button) && LastGamePadStates[i].IsButtonUp(button)) { return true; } else { return false; } } } } Last edited by Izzy; 12-9-2010 at 12:45 AM.. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|