-
Posts
-
By Setnom · Posted
I'm team Rossmann all the way. I have the exact same NVME, altough not in an array like him. -
By testman · Posted
It had gone weeks ago. Although thinking about it I'm on the beta. -
By RejZoR · Posted
They thought value of their goods would forever only drop like it used to and didn't account for sudden increase in price because of all the Ai hype. Tough luck Samsung, don't try to weasel this one out. Also American customer protection laws are a**. In Europe, you need to be compensated for a functioning product of same or better characteristics (not same price point as when it was originally bought!) if it can't be repaired and when you receive a replacement product your warranty starts from scratch because you received a different item than you previously had and old warranty thus cannot apply to it anymore. If your actual item was successfully repaired, warranty gets extended for the period the item was in service. If item is repaired to a significant extent, warranty also starts over from scratch because major part of it was replaced. Americans need to fight to get this kind of consumer protections because they are constantly getting screwed over. -
By TarasBuria · Posted
Microsoft releases new Windows 11 Media Creation Tool with the latest updates by Taras Buria Patch Tuesday updates arrive every month, bringing users new features and security updates. To make sure customers have access to the most recent images, Microsoft also releases updates to the Media Creation Tool app, its official utility for Windows 11 installation. Today, the company pushed new ISOs to Media Creation Tool, allowing you to create images with the June 2026 Patch Tuesday updates. With the latest update, the Media Creation Tool now downloads KB5094126. It is Windows 11 version 25H2, build 26200.8655, which is also available via Windows Update. Note that the app itself remains on the previous version, which you can check in Properties > Details. The only change is that it now downloads a more recent Windows 11 build, so the only way to check is to download an ISO. The June 2026 Patch Tuesday update is a special release for Windows 11, as it brings a new performance profile to make the operating system more responsive and snappier when rendering various user interface surfaces, including the Start menu, quick settings, and more. It does so by spiking processor speeds for a brief moment, resulting in higher loads for a second or two. The so-called “Low latency profile” is rolling out gradually, but you can force-enable it with the ViVeTool app. Other changes include webcam improvements, Task Manager updates, shared audio support, and more. You can download the Media Creation Tool app from the official Microsoft website using this link. Besides MCT, Microsoft lets you download Windows 11 ISO as a file directly from the official Windows 11 website. However, you will need a third-party app to write it to your USB drive. Check out this guide if you want to know how to do that. -
By FunkyMike · Posted
Hope he teaches them a lesson.
-
-
Recent Achievements
-
davidbazooked earned a badge
Week One Done
-
Jamswaz earned a badge
One Month Later
-
Jamswaz earned a badge
Week One Done
-
Marzoid went up a rank
Rookie
-
coch went up a rank
Community Regular
-
-
Popular Contributors
-
Tell a friend
Question
cfoy2
i have a homework assignment that is due next week. i am trying to create a game of the amazons type of game. we are using c language. i need someone to write a pseudocode because im not sure how.
more info:
The software to be developed is inspired by the Game of the Amazons board game, with four queens to both players, of which move before firing an ‘arrow’ that obstructs tiles. In short, the objective is to block off the movement of the opponent’s teams, and the game concludes whenever someone can no longer move any of their queens. This task requires the game to check many conditions before and after moves are made.
As follows, this is the scope of the aforementioned project:
· The application will be programmed in Java, and therefore should be able to operate on multiple platforms as java allows, however it is not designed with mobile devices in mind.
· It functions as a standalone application without any network functionality.
· The application will support two player local play and player vs AI. The mouse should be implemented as a control that allows characters to select pieces and direct them to move or fire an arrow. The AI should at minimum should be able to move and fire arrows according to the rules.
· The application will consist of a GUI that allows a user to interact with it without need of a console. This includes a menu that allows players to start the game, designate game mode, and forfeit games, as well as a window that displays the grid in which the game takes place (10x10 grid).
Speculated classes, functions and data
This document is more or less a rough draft for the design process. Build on the ideas of these classes
// Main menu content goes here. There may be classes for buttons and functionality in the menus.
//
//
// End main menu content
Main
The main file here operates the cycle of the game. The general flow will be as follows
Begin player turn. Check the 8 neighbors of all tiles that have the queen tag matching the current player’s turn. Use a special check neighbor function here. Game ends if no free queens are found on the grid.
Begin loop that waits for user input. It repeats until a valid queen is selected.
Begin loop that waits for user input. Repeats until a valid destination for the selected queen is selected. Queens can only move in 8 directions.
Begin loop that waits for user input. Repeats until a valid destination for the queen’s arrow is selected (aiming is centered on the queen’s selected destination.) Like queens, can only go in 8 directions.
With all loops completed, move the queen and place the arrow token in their respective destinations, and end turn. Return to top.
Constant: int MAX = 10
Board(int MAX, int MAX)
2D array of integers. Given how simple the game is, this is all that should be necessary.
A ‘0’ means the tile is unoccupied.
A ‘1’ means it is occupied by a player1 queen.
A ‘2’ means it is occupied by a player2 queen.
A ‘3’ means it is occupied by an arrow.
Function: boolean checkOpen (source Board(int X, int Y))
Checks neighbors of a specific board tile. Used at the start to determine if there are any free queens.
That means the eight neighboring cells: (X+1, Y-1) (X+1, Y) (X+1, Y+1) (X, Y+1) (X, Y-1) (X-1, Y-1) (X-1, Y) (X-1, Y+1).
If none are unoccupied (have a value of 0), then return false.
If at least one is unoccupied (has a value of 0), then return true.
Function: Boolean checkMove(source Board(int X1, int Y1), destination Board(int X2, int Y2))
Checks if move is legal. Can be used for both moving queens and choosing an arrow destination.
First, checks if the destination is in one of the eight directions.
If both have an equal X value AND Y value, it is illegal
Return false.
If both have an equal X value OR an equal Y value, it is in a valid direction.
If it is in one of the diagonal directions, it is a valid direction.
Will have to use math. If X2 is greater than X1 by 3, and Y2 is also greater than Y2 by 3, it should be diagonal. Can replace the 3 with any value, positive or negative. So the formula looks like:
If ((X2 – X1) = (Y2 – Y1)) then it is a valid direction.
Check if all tiles between them are unoccupied.
Formula differs based on which direction.
If there is an occupied tile in the path, it is illegal.
Return false.
Is there are only unoccupied tiles in the path, it is legal.
Return true.
Function: void commitMovement( source Board(int X1, int Y1), queendestination Board(int X2, int Y2), arrowdestination Board(int X3, int Y3))
With all loops finished and changes ready to commit, this makes changes to the board.
Sets queendestination Board(int X2, int Y2)’s integer equal to source Board(int X1, int Y1)’s integer (1 or 2).
Sets source Board(int X1, int Y1)’s integer to 0.
Sets arrowdestination Board(int X3, int Y3)’s integer to 3.
This is all done by inputting Board( x, y) = int. Or whatever equivalent in C#.
Link to comment
https://www.neowin.net/forum/topic/1392491-help-write-a-pseudocode/Share on other sites
0 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now