Jump to content

CrazyManth3

Members
  • Posts

    20
  • Joined

  • Last visited

Everything posted by CrazyManth3

  1. Those people who need reading glasses: I've got your back.
  2. I am the one Who slips through your dreams I have not overdone Even though it seems I've got a block of cheese But only in your dreams
  3. How do you know of the Unknown? It should be a mystery...
  4. I'm actually impressed with the number of cat gifs being posted
  5. I feel like the cuteness of these cats are slowly draining the life force from my soul. That last one... is absolutely beautiful.
  6. Huh, well this exploration was enlightening and at least worth a try.
  7. oh okay... I am now sad... Though why does it ask for the type of code you are using?
  8. Shoot. What is the aide? (function() { var SIZE = 500; // Size of the play-field in pixels var GRID_SIZE = SIZE / 50; var c = document.getElementById('c'); c.height = c.width = SIZE * 2; // 2x our resolution so retina screens look good c.style.width = c.style.height = SIZE + 'px'; var context = c.getContext('2d'); context.scale(2, 2); // Scale our canvas for retina screens var direction = newDirection = 1; // -2: up, 2: down, -1: left, 1: right var snakeLength = 5; var snake = [{x: SIZE / 2, y: SIZE / 2}]; // Snake starts in the center var candy = null; var end = false; function randomOffset() { return Math.floor(Math.random() * SIZE / GRID_SIZE) * GRID_SIZE; } function stringifyCoord(obj) { return [obj.x, obj.y].join(','); } function tick() { var newHead = {x: snake[0].x, y: snake[0].y}; // Only change directon if the new direction is a different axis if (Math.abs(direction) !== Math.abs(newDirection)) { direction = newDirection; } var axis = Math.abs(direction) === 1 ? 'x' : 'y'; // 1, -1 are X; 2, -2 are Y if (direction < 0) { newHead[axis] -= GRID_SIZE; // Move left or down } else { newHead[axis] += GRID_SIZE; // Move right or up } // Did we eat a candy? Detect if our head is in the same cell as the candy if (candy && candy.x === newHead.x && candy.y === newHead.y) { candy = null; snakeLength += 20; } context.fillStyle = '#002b36'; context.fillRect(0, 0, SIZE, SIZE); // Reset the play area if (end) { context.fillStyle = '#eee8d5'; context.font = '40px serif'; context.textAlign = 'center'; context.fillText('Refresh to play again', SIZE / 2, SIZE / 2); } else { snake.unshift(newHead); // Add the new head to the front snake = snake.slice(0, snakeLength); // Enforce the snake's max length } // Detect wall collisions if (newHead.x < 0 || newHead.x >= SIZE || newHead.y < 0 || newHead.y >= SIZE) { end = true; } context.fillStyle = '#268bd2'; var snakeObj = {}; for (var i = 0; i < snake.length; i++) { var a = snake[i]; context.fillRect(a.x, a.y, GRID_SIZE, GRID_SIZE); // Paint the snake // Build a collision lookup object if (i > 0) snakeObj[stringifyCoord(a)] = true; } if (snakeObj[stringifyCoord(newHead)]) end = true; // Collided with our tail // Place a candy (not on the snake) if needed while (!candy || snakeObj[stringifyCoord(candy)]) { candy = {x: randomOffset(), y: randomOffset()}; } context.fillStyle = '#b58900'; context.fillRect(candy.x, candy.y, GRID_SIZE, GRID_SIZE); // Paint the candy } window.onload = function() { setInterval(tick, 100); // Kick off the game loop! window.onkeydown = function(e) { newDirection = {37: -1, 38: -2, 39: 1, 40: 2}[e.keyCode] || newDirection; }; }; })(); Oh it's just source code, now it makes sense
  9. So I noticed the button for "code", and there are options for JavaScript and Python, and several other types of coding. I was wondering what cool amazing things the people of the Shard can do with this option. I once had a Web Design class where we learned HTML, but I've forgotten how to do it... <header> I forgot how HTML works
  10. That dagger almost looks like an arachnid ready for a strike
  11. I honestly don't know how to respond to that.
  12. Granted, you may now use each of the Feruchemical powers, but your metalminds hunger for the blood of other Feruchemists. You must kill every so often to use your powers. I wish for a friendly sentient weapon (and an interesting bane).
  13. Oh @Ookla the Excessive, I have figured out your tactics. After every new post you insert a new gif of an adorable kitten. Diabolical... Only fear the constant nagging impulse to post more and more, lest you are sucked into an unending loop of cat cuteness! But surely, you will win...
  14. You must be the cloaked night, the hidden place, the cover of darkness.

    And friend of the mistborn.

    1. Honorless

      Honorless

      This name wasn't already taken? Dang, cool grab, @Mist 

  15. The 17th Shard is rather cool
  16. Wait a second... there's a button... for coding...?

    I can't code, but this seems really cool

    1. Honorless

      Honorless

      It's for sharing code so it appears formatted correctly. No code runs on the editor. That's not something any sane website would allow.

  17. I... This... I love this thread
  18. Oh my the cuteness
  19. I really love everything Nohadon says in the Stormlight Archive
  20. Oh my, it would not be fun to do that Edit: Wait I like cats too
  21. Thank you, I appreciate it. And also this chance to win
  22. Impressive. That's talent.
  23. Wow I gained three followers over the course of one day by actually contributing to the Shard. How are you fellow human beings? Wait does a status update count as a post?

×
×
  • Create New...