diff --git a/Clock/Clock.css b/Clock/Clock.css index 95caca9..5345eb2 100644 --- a/Clock/Clock.css +++ b/Clock/Clock.css @@ -4,7 +4,7 @@ } body { - background-image: url('https://picsum.photos/1920/1080'); + background-image: url('https://wallpaperaccess.com/full/3535237.jpg'); } .main { diff --git a/Express/index.js b/Express/index.js new file mode 100644 index 0000000..c726ebe --- /dev/null +++ b/Express/index.js @@ -0,0 +1,19 @@ +const express = require('express'); +const app = express(); +const port = process.env.PORT || 3000; + +app.get('/ps', (req,res) => { + let ps1 = parseInt(req.query.ps1); + let ps2 = parseInt(req.query.ps2); + res.send(`${ps1+ps2}`); +}); + +app.get('/ms', (req,res) => { + let ms1 = parseInt(req.query.ms1); + let ms2 = parseInt(req.query.ms2); + res.send(`${ms1-ms2}`); +}); + +app.listen(port, _ =>{ + console.log(`Server On! ${port}`); +}); \ No newline at end of file diff --git a/RockScissorsPaper/RockScissorsPaper.js b/RockScissorsPaper/RockScissorsPaper.js index 120deb7..22eebdf 100644 --- a/RockScissorsPaper/RockScissorsPaper.js +++ b/RockScissorsPaper/RockScissorsPaper.js @@ -1,6 +1,6 @@ let interval, selected, i = 0; -function start() { +function s() { interval = setInterval(() => { if (i == 3) i = 1; else i++; @@ -8,27 +8,27 @@ function start() { }, 500); } -function stop() { +function sp() { clearInterval(interval); interval = null; } -start(); +s(); window.onload = () => { - const key = ['rock', 'scissors', 'paper']; + const k = ['rock', 'scissors', 'paper']; for (const v of document.querySelector('.user').childNodes) { v.addEventListener('dragstart', () => { - selected = key.indexOf(v.className) + 1; + selected = k.indexOf(v.className) + 1; }); } document.querySelector('.dropzone').addEventListener('dragleave', () => { let result; - if (selected == i) result = '무승부'; - else if (selected - i == 1 || selected - i == -2) result = '패배'; - else result = '승리'; + if (selected == i) result = 'DRAW'; + else if (selected - i == 1 || selected - i == -2) result = 'LOSE'; + else result = 'WIN'; document.querySelector('.body').innerHTML = result; - stop(); + sp(); }); }; \ No newline at end of file diff --git a/Task/first.js b/Task/first.js index a807432..b2c03cb 100644 --- a/Task/first.js +++ b/Task/first.js @@ -6,17 +6,22 @@ Ex) * test2 * ********* */ +function whgdk (message){ + let star = "**"; + for(let i = 0; i String(v).length)); - console.log('*'.repeat(max + 4)); - for (let v of args) { - const space = max - String(v).length; - console.log(`* ${' '.repeat((space + 1) / 2)}${v}${' '.repeat(space / 2)} *`); +function rnt (...para){ + for(let i of para){ + whgdk(i); } - console.log('*'.repeat(max + 4)); -} - -printer('test2', 199999, 1271799); \ No newline at end of file +} \ No newline at end of file diff --git a/Task/index.html b/Task/index.html new file mode 100644 index 0000000..d32763c --- /dev/null +++ b/Task/index.html @@ -0,0 +1,12 @@ + + + + + + + Document + + + + + \ No newline at end of file