2 Star 4 Fork 2

爱动手的三角喵/javascript_writing_Chip8

Create your Gitee Account
Explore and code with more than 13.5 million developers,Free private repositories !:)
Sign up
文件
This repository doesn't specify license. Please pay attention to the specific project description and its upstream code dependency when using it.
Clone or Download
1.创建Chip8对象.html 860 Bytes
Copy Edit Raw Blame History
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>创建Chip8对象</title>
</head>
<body>
我们假设CHIP8只有:**处理器、键盘、显示屏与扬声器** 那么代码为:
<script>
(function () {
function CPU() {/*...*/ };
function Screen() {/*...*/ };
function Keyboard() {/*...*/ };
function Speaker(){/*...*/ };
window.CHIP8 = function () {
var c8 = new CPU();
c8.screen = new Screen();
c8.speaker = new Speaker();
c8.input = new Keyboard();
return c8;
};
})();
</script>
</body>
</html>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
HTML
1
https://gitee.com/baojuhua/javascript_writing_Chip8.git
git@gitee.com:baojuhua/javascript_writing_Chip8.git
baojuhua
javascript_writing_Chip8
javascript_writing_Chip8
master

Search

371d5123 14472233 46e8bd33 14472233