GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Shooter_javascript_game/src/code.js at development · peterrobert/Shooter_javascript_game

Expand file tree

/

code.js

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
55 lines (42 loc) · 1.49 KB
/

code.js

Copy path

File metadata and controls

55 lines (42 loc) · 1.49 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/* eslint-disable import/no-cycle, import/prefer-default-export, no-console, no-plusplus */
import { Initialize } from './gameScene';
import { ScoreSave } from './score';
window.onload = () => {
const container = document.getElementById('my-game');
let name;
container.innerHTML = `<form id = "nameForm">
<label for="fname">Please Enter Your name:</label>
<input type="text" id="fname" name="fname" required><br><br>
<input type="submit" value="Submit" id="sub-btn"">
</form>
`;
const SubmitName = document.getElementById('nameForm');
SubmitName.addEventListener('submit', () => {
name = document.getElementById('fname').value;
container.innerHTML = '';
Initialize(name);
});
const buttonContainer = document.getElementById('leader_board');
buttonContainer.innerHTML = `<button id="btnb">Leaders Board</button>
<div id="leader_show">
</div>`;
const Leadrbtn = document.getElementById('btnb');
Leadrbtn.addEventListener('click', () => {
const Lead = new ScoreSave();
Lead.leaderBoard();
Leadrbtn.disabled = 'disabled';
});
};
export function theValues(value) {
try {
const rValues = value.result;
const ulContainer = document.createElement('ul');
for (let i = 0; i < rValues.length; i++) {
const listContainers = document.createElement('li');
listContainers.innerText = `name: ${rValues[i].user} score: ${rValues[i].score}`;
ulContainer.appendChild(listContainers);
}
} catch (error) {
console.log(error);
}
}
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.