Giter Site home page Giter Site logo

dnapro's Introduction

DNAborhood Read.ME

Navigate around Dr. Rosalind Franklin's lab and help her sequence some genomes! Live Game


Live

Play the game live here!

Description

Welcome to the DNAborhood - learn about genome sequencing through a fun, exciting, and extremely well-executed game and various interactive elements.

Overview

  • New game will randomly generate two strings, randomly hide characters in those strings and start you off with 4 guesses
  • Sounds hard? Fear not. The top string and bottom string are connected, just like real DNA
  • Win by filling in the spaces with available letters from the pool and guessing the correct sequence
  • Hover over the glowing green orbs on the page to learn more about the wonderful world of DNA!

Functionality

  • Start and restart game
  • Show losing or winning message
  • Allow users to interact with elements on the page

Languages and Technologies

  • Vanilla JavaScript
  • HTML5/ CSS3

Additional features

  • Image 1 - Interactive "orb" elements with animated pop-up
@keyframes pulse {
	0% {
		/* transform: scale(0.95); */
	}

	50% {
        /* transform: scale(1); */
        color: rgba(132, 168, 247, 0.459)	}

	100% {
		/* transform: scale(0.95); */
	}
}

  • Image 2 - Click to place letters or swap letters using a click counter
this.hiddenTopStrand.map((letter, i) => {
      let div = document.createElement("div");
      if (letter.length > 1) div.innerHTML = letter.charAt(0);
      if (letter.length === 1) div.innerHTML = letter;
      div.className = "letters";
      div.id = "topletter" + i;

      div.addEventListener("click", () => {
        if (clicks === 0) {
          div.className += " selected";
          clicks += 1;
        } else {
          let selected = document.getElementsByClassName("selected").item(0);
          selected.className = selected.className.replace(" selected", "")

          let temp = div.innerHTML;
          div.innerHTML = selected.innerHTML;
          selected.innerHTML = temp;

          clicks = 0;
          topGuess[i] = div.innerHTML;
        }
      })
      top.appendChild(div);
    })

Future considerations

  • Leaderboard
  • Counter for strands sequenced
  • Cycle through facts with each hover
  • More hoverable, informational green orbs!

dnapro's People

Contributors

v-campbell avatar sadfsadfsdafh avatar mortezar avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.