talk about the constant post
KEY COMMITS:
7d977cfa8aba1ec14285059e9325626f8b8f64e4 (budget version of the player setting in case)
41620e1459cb3a3e111f025372111c8d6964bd6b (update board chess)
2772b68255833571d564186479f3a671b367d52a (chat and navbar changes with progress on chess int)
N/A
Creating board replica
function {
create 2d list
for {
for {
access the board with corresponding ids and then add it relative to its position to the 2d list
}
}
return the list
}
Sending The Board
function {
create a dictionary with the updated board, the turn number, black castle chance, and white castle chance
create a post request to post the dictionary to the backend database (the db handles one dictionary at a given moment)
}
Receiving the Board
function {
do a get request that checks whether the current board is different or the same as the gotten board, if equal, skip.
set the current board’s details with the received data
}
(HAVE THIS CODE RUNNING EVERY 0.1 SECOND IN ORDER TO AUTO UPDATE THE BOARD)
Updating the Board
function {
for {
for every id corresponding to a square on the board, set it as the piece based on the list
}
}
Set Color
function {
Assign the user a color to play as }
Reset board
function{
resets the board with a predefined outline of a board
}
What Are we DOin’
- Chat system that works across different devices
- Done by having a database of messages that can have data posted and gotten from it
- This essentially will create a chat system
- Create a chat html page
- Create a chess game that can be played multiplayer
Chat
- Worked on the html and CSS
- Errors:
- I faced errors that were mostly with the css of the project but one thing I did was create a function that takes the chatter to the most recent message.
- The css problems included: scaling, text overlapping, or div boxes issues.
Chess
- Worked on the actual chess logic as well as the multiplayer integration
- The chess board follows simple chess rules
- However, it doesn’t calculate or sense checkmates so you have to manually capture the king
- The chess board is integrated into multiplayer by having players choosing a color they want to play as.
- If the chess player is of valid turn and color, it allows the user to make moves that are posted to the database.
- There is a database that keeps track of the most recent chess board positions and the turns and other game logic.
- The functions does a post request every time a piece is moved.
- In order to stay up to date, the get request runs every 0.1 second.
- The chess board will be copied and sent as the post request
- The received chess board will be applied to the layout of the current board for the database.
- The updated board will be updated on every computer as it is doing a get request every 0.1 second.
Question 17
- What does it mean when it says “digital divide”?
- The term “digital divide” refers to the gap or disparity in access to and use of digital technologies, such as the internet and digital devices, between different groups or communities. This divide can be based on various factors, including socioeconomic status, geographic location, age, education, and other demographics.
- I chose all the options as they all sounded plausible to be true of reducing digital divide
Question 23
- What is redundant rerouting?
- Redundant routing, also known as network redundancy or routing redundancy, is a networking concept that involves the creation of multiple network paths or routes between devices or network segments. The primary purpose of redundant routing is to enhance network reliability, fault tolerance, and availability by providing alternative paths for data to travel in case of network failures or congestion. Redundant routing can be particularly important in critical or high-availability network environments to minimize downtime and ensure continuous network operation.
- For the question, I put C as my answer which connects P and S in several different ways. I put this because I thought it meant that it could connect it through different pathways.
- The correct answer was B, which connects P to S in only way optional path.
- I understand now because redundant rerouting has the purpose of providing one path between each.
Question 37
- Comparing code segments to compute average from list
- I got this wrong because I thought program II was unable to provide the intended functionality. It seemed impossible to find the value of the average using that mathematical process.
- But after testing the process with different number values, I have concluded that this method of solving for the average is a possible one.
- So the answer should be that both segments work perfectly fine.
- But the first option requires more arithmetic processes as it does a calculation every iteration of the while loop. Essentially double the calculations
Question 46
- Infinite loops in undecideable problems
- The answer is A because it is quite impossible to develop a single purpose code that solves all problems or errors that it may encounter when taking in input values.
- I chose A at first because I thought it would be able to determine a way to solve the problem somehow
Question 47
- Encrypting and decrypting using public key cryptography
- I wasn’t sure what cryptography was
- Cryptography: Cryptography is the science and practice of securing communication and information through the use of codes and ciphers. It is a fundamental technology for protecting data and ensuring the confidentiality, integrity, and authenticity of information in various applications, including secure communication, data storage, and authentication. Cryptography has a long history and plays a crucial role in modern digital security.
- The answer is D because in public cryptography, a message is encrypted with a recipient’s public key and decrypted with the recipient’s private key
- I chose the sender’s private key as I thought it would be necessary.
- The choice is wrong because the sender’s private key cannot be used to decrypt the message.
Question 64
- Cloud computing and the Internet
- Cloud Computing: Cloud computing refers to the delivery of computing services, including storage, processing, networking, and software applications, over the internet. Instead of organizations or individuals managing their own physical servers and infrastructure, they can access and use these resources on a pay-as-you-go basis from cloud service providers.
- Internet: The internet is a global network of interconnected computer networks. It allows the exchange of data and information between devices and users worldwide. The internet is a vast infrastructure that enables various services and activities, including communication, information sharing, e-commerce, and much more.
- I chose option D, which is wrong. It is wrong because cloud storage sites allow users to share files easily, which could lead to increased concerns about copyrighted materials being illegally distributed online. So basically it is counterintuitive
- The correct option is B because cloud computing has more easily available sharing, communicating, and collaborating between users.
- Easier way to share files and tools
Question 65
- Correcting errors in procedure Multiply
- I chose A, which is incorrect because if x and y are both positive, the procedure will correctly calculate the product by adding x to itself y times.
- The correct option is D because if y is negative, then the condition count equals y will never be met since count begins at 0 and repeatedly increases.
- I got this wrong due to the lack of predicting the outcome of program.