Skip to content

Commit

Permalink
fixed summary message
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelmv30 committed May 2, 2024
1 parent 7c0d86b commit 00e9558
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 32 deletions.
65 changes: 33 additions & 32 deletions html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -477,43 +477,44 @@ <h2>List of valid Words</h2>
else if (receivedData.includes("Summary_list"))
{
summary = JSON.parse(event.data);
//document.getElementById('Summary')
var summaryDiv = document.getElementById('Summary');
for (var key in summary.Summary_list)
{

if (key === username)
{
summaryDiv.textContent = "You " + summary.Summary_list[key];
}

//document.getElementById('Summary')
var summaryDiv = document.getElementById('Summary');

}

var button1 = document.createElement("button");
button1.textContent = "Okay";
button1.id = "OKAY";
button1.addEventListener('click', okay);
summaryDiv.appendChild(button1);

button1.style.display = "block";
button1.style.marginTop = "20px";
button1.style.fontSize = "20px";

summaryDiv.style.display = "block";
summaryDiv.style.position = "absolute";
summaryDiv.style.zIndex = "999";
summaryDiv.style.top = "50%";
summaryDiv.style.left = "50%";
summaryDiv.style.transform = "translate(-50%, -50%)";
summaryDiv.style.backgroundColor = "rgba(255, 255, 255, 0.9)";
summaryDiv.style.width = "800px"; // Adjust the width as needed
summaryDiv.style.height = "400px"; // Adjust the height as needed
summaryDiv.style.padding = "20px"; // Add padding to center the content
summaryDiv.style.textAlign = "center"; // Center the text horizontally
summaryDiv.style.borderRadius = "5px";
summaryDiv.style.boxShadow = "0 0 10px rgba(0, 0, 0, 0.3)";
summaryDiv.style.fontSize = "30px";

summaryDiv.textContent = "You " + summary.Summary_list[key];


var button1 = document.createElement("button");
button1.textContent = "Okay";
button1.id = "OKAY";
button1.addEventListener('click', okay);
summaryDiv.appendChild(button1);

button1.style.display = "block";
button1.style.marginTop = "20px";
button1.style.fontSize = "20px";

summaryDiv.style.display = "block";
summaryDiv.style.position = "absolute";
summaryDiv.style.zIndex = "999";
summaryDiv.style.top = "50%";
summaryDiv.style.left = "50%";
summaryDiv.style.transform = "translate(-50%, -50%)";
summaryDiv.style.backgroundColor = "rgba(255, 255, 255, 0.9)";
summaryDiv.style.width = "800px"; // Adjust the width as needed
summaryDiv.style.height = "400px"; // Adjust the height as needed
summaryDiv.style.padding = "20px"; // Add padding to center the content
summaryDiv.style.textAlign = "center"; // Center the text horizontally
summaryDiv.style.borderRadius = "5px";
summaryDiv.style.boxShadow = "0 0 10px rgba(0, 0, 0, 0.3)";
summaryDiv.style.fontSize = "30px";
}
}
}
else
{
Expand Down Expand Up @@ -743,7 +744,7 @@ <h2>List of valid Words</h2>
{
var threeMinutes = 60 * 3, // 3 minutes in seconds
display = document.querySelector('#timer');
startTimer(threeMinutes, display);
startTimer(15, display);
}

function sendMessage()
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/uta/cse3310/Create_Grid.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ public class Create_Grid {
public double density;
public ArrayList<String> validWords;
public ArrayList<String> selected_words;
public double calc_density;
public double horiz_density;
public double vert_density;
public double diag_density;

public Create_Grid(int boardLength, int boardWidth, double density) {
this.boardLength = boardLength;
Expand Down

0 comments on commit 00e9558

Please sign in to comment.