Code Monkey home page Code Monkey logo

raffle's Introduction

抽奖程序

奇舞团有个传统,每年年会现场由月影现场写一个抽奖程序,所有人一起review代码,以确保抽奖程序算法没有问题,然后组织抽奖。

这个项目是奇舞团历年抽奖程序实现的开源版本。

由于2017年之前的代码找不到了(囧),所以现在只有两个版本,但是2019年和2020年的玩法已经想好了,敬请期待,嘿嘿嘿~

2017年会抽奖

在线演示 CodePen

assets/2017.jpg

2018年会抽奖

在线演示 CodePen 知乎文章

assets/2018.jpg

2019年会抽奖

在线演示 公众号文章

assets/2019.jpg

LICENSE

MIT

raffle's People

Contributors

akira-cn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

raffle's Issues

2018年抽奖程序扰动范围-0.1 ~ +0.1不正确

源码app.js第79行
const subDuration = durations.map(d => d * factor * random(9, 11) / 10);
应该是
const subDuration = durations.map(d => d * factor * random(9, 2) / 10);
function random(m, n) {
return m + Math.random() * n
}
这样才能保证误差在-0.1 - 0.1之间

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.