<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Онлайн игры</title>
		<link>https://inf.moy.su/stuff/</link>
		<description>Онлайн игры</description>
		<lastBuildDate>Mon, 22 Jul 2024 07:23:42 GMT</lastBuildDate>
		<generator>uCoz Web-Service</generator>
		<atom:link href="https://inf.moy.su/stuff/rss" rel="self" type="application/rss+xml" />
		
		<item>
			<title>Бильярд</title>
			<description>&lt;!DOCTYPE html&gt;
&lt;html lang=&quot;en&quot;&gt;
&lt;head&gt;
 &lt;meta charset=&quot;UTF-8&quot;&gt;
 &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;
 &lt;title&gt;Billiards Game&lt;/title&gt;
 &lt;link rel=&quot;stylesheet&quot; href=&quot;styles.css&quot;&gt;
&lt;/head&gt;
&lt;body&gt;
 &lt;canvas id=&quot;gameCanvas&quot; width=&quot;800&quot; height=&quot;400&quot;&gt;&lt;/canvas&gt;
 &lt;script src=&quot;game.js&quot;&gt;&lt;/script&gt;
&lt;/body&gt;
&lt;/html&gt;

body {
 display: flex;
 justify-content: center;
 align-items: center;
 height: 100vh;
 background-color: #2c3e50;
 margin: 0;
}

canvas {
 background-color: #27ae60;
 border: 1px solid #ecf0f1;
}
const canvas = document.getElementById(&apos;gameCanvas&apos;);
const ctx = canvas.getContext(&apos;2d&apos;);

const balls = [];
const ballRadius = 10;
const tableWidth = canvas.width;
const tableHeight = canvas.height;

class Ball {
 constructor(x, y, dx, dy) {
 this.x = x;
 this.y = y;
 this.dx = dx;
 this.dy = dy;
 }

 draw() {
 ctx.beginPath();
 ctx.arc(this.x, this.y, ballRadius, 0, Math.PI * 2);
 ctx.fillStyle = &quot;#fff&quot;;
 ctx.fill();
 ctx.closePath();
 }

 update() {
 if (this.x + this.dx &gt; tableWidth - ballRadius || this.x + this.dx &lt; ballRadius) {
 this.dx = -this.dx;
 }
 if (this.y + this.dy &gt; tableHeight - ballRadius || this.y + this.dy &lt; ballRadius) {
 this.dy = -this.dy;
 }

 this.x += this.dx;
 this.y += this.dy;

 this.draw();
 }
}

function init() {
 for (let i = 0; i &lt; 5; i++) {
 const x = Math.random() * (tableWidth - ballRadius * 2) + ballRadius;
 const y = Math.random() * (tableHeight - ballRadius * 2) + ballRadius;
 const dx = (Math.random() - 0.5) * 2;
 const dy = (Math.random() - 0.5) * 2;
 balls.push(new Ball(x, y, dx, dy));
 }
}

function animate() {
 requestAnimationFrame(animate);
 ctx.clearRect(0, 0, tableWidth, tableHeight);
 balls.forEach(ball =&gt; ball.update());
}

init();
animate();</description>
			
			<link>https://inf.moy.su/stuff/drugie/drugie/biljard/2-1-0-4</link>
			<category>Другие</category>
			<dc:creator></dc:creator>
			<guid>https://inf.moy.su/stuff/drugie/drugie/biljard/2-1-0-4</guid>
			<pubDate>Mon, 22 Jul 2024 07:23:42 GMT</pubDate>
		</item>
		<item>
			<title>Dusk Drive</title>
			<description>&lt;embed width=&quot;800&quot; height=&quot;512&quot; base=&quot;http://external.kongregate-games.com/gamez/0022/3733/live/&quot; src=&quot;http://external.kongregate-games.com/gamez/0022/3733/live/embeddable_223733.swf&quot; type=&quot;application/x-shockwave-flash&quot;&gt;&lt;/embed&gt;&lt;br/&gt;Play free games at &lt;a href=&quot;http://www.kongregate.com/&quot;&gt;Kongregate&lt;/a&gt;</description>
			
			<link>https://inf.moy.su/stuff/drugie/drugie/dusk_drive/2-1-0-2</link>
			<category>Другие</category>
			<dc:creator></dc:creator>
			<guid>https://inf.moy.su/stuff/drugie/drugie/dusk_drive/2-1-0-2</guid>
			<pubDate>Thu, 31 Dec 2015 16:21:54 GMT</pubDate>
		</item>
	</channel>
</rss>