Skip to content

Commit

Permalink
Added documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
smokelaboratory committed May 19, 2020
1 parent 063cff6 commit 99f3e00
Show file tree
Hide file tree
Showing 10 changed files with 394 additions and 30 deletions.
76 changes: 76 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at brvachhani@gmail.com. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq
65 changes: 65 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Contributing
We'd love for you to contribute to our source code and to make the project even better than it is today!
Here are the guidelines we'd like you to follow:

- [Code of Conduct](#coc)
- [Git Commit Messages](#commit)
- [Got a Question or Problem?](#question)
- [Found an Issue?](#issue)

## <a name="coc"></a> Code of Conduct
[Code of Conduct](https://github.com/smokelaboratory/fludo/blob/master/CODE_OF_CONDUCT.md)

## <a name="commit"></a> Git Commit Messages

* Use the present tense ("Add feature" not "Added feature")
* Use the imperative mood ("Move cursor to..." not "Moves cursor to...")
* Limit the first line to 72 characters or less
* Reference issues and pull requests liberally after the first line
* When only changing documentation, include `[ci skip]` in the commit title
* Consider starting the commit message with an applicable emoji:
* :art: `:art:` when improving the format/structure of the code
* :racehorse: `:racehorse:` when improving performance
* :non-potable_water: `:non-potable_water:` when plugging memory leaks
* :memo: `:memo:` when writing docs
* :bug: `:bug:` when fixing a bug
* :fire: `:fire:` when removing code or files
* :green_heart: `:green_heart:` when fixing the CI build
* :white_check_mark: `:white_check_mark:` when adding tests
* :lock: `:lock:` when dealing with security
* :arrow_up: `:arrow_up:` when upgrading dependencies
* :arrow_down: `:arrow_down:` when downgrading dependencies
* :shirt: `:shirt:` when removing lint/checkstyle warnings

Find all the available emojis [here](https://gitmoji.carloscuesta.me/).

## <a name="question"></a> Got a Question or Problem?

If you feel that we're missing an important bit of documentation, feel free to
file an issue so we can help. Here's an example to get you started:

```
What are you trying to do or find out more about?
Where have you looked?
Where did you expect to find this information?
```

## <a name="issue"></a> Found an Issue?
If you find a bug in the source code or a mistake in the documentation, you can help us by
submitting an issue to our project.

To submit an issue, please check the [Issue Template](https://github.com/smokelaboratory/fludo/blob/master/ISSUE_TEMPLATE.md).

Even better you can submit a Pull Request with a fix.

### Pull Request
To generate a pull request, please consider following [Pull Request Template](https://github.com/smokelaboratory/fludo/blob/master/PULL_REQUEST_TEMPLATE.md).

* Search [GitHub](https://github.com/smokelaboratory/fludo/pulls) for an open or closed Pull Request
that relates to your submission. You don't want to duplicate effort.
* Please have a look at [License](https://github.com/smokelaboratory/fludo/blob/master/LICENSE) before sending pull
requests. We cannot accept code without this.

That's it! Thank you for your contribution!
24 changes: 24 additions & 0 deletions ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
### Prerequisites

* Reproduce the problem
* Check that your issue isn't already filed: https://github.com/issues?utf8=✓&q=is%3Aissue+user%3Asmokelaboratory

### Description

[Description of the issue]

### Steps to Reproduce

1. [First Step]
2. [Second Step]
3. [and so on...]

**Expected behavior:** [What you expect to happen]

**Actual behavior:** [What actually happens]

**Reproduces how often:** [What percentage of the time does it reproduce?]

### Additional Information

Any additional information, configuration or data that might be necessary to reproduce the issue.
46 changes: 46 additions & 0 deletions PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
### Requirements

* Filling out the template is required. Any pull request that does not include enough information to be reviewed in a timely manner may be closed at the maintainers' discretion.
* All new code requires tests to ensure against regressions

### Description of the Change

<!--
We must be able to understand the design of your change from this description. If we can't get a good idea of what the code will be doing from the description here, the pull request may be closed at the maintainers' discretion. Keep in mind that the maintainer reviewing this PR may not be familiar with or have worked with the code here recently, so please walk us through the concepts.
-->

### Alternate Designs

<!-- Explain what other alternates were considered and why the proposed version was selected -->

### Why Should This Be In Core?

<!-- Explain why this functionality should be in atom/atom as opposed to a package -->

### Benefits

<!-- What benefits will be realized by the code change? -->

### Possible Drawbacks

<!-- What are the possible side-effects or negative impacts of the code change? -->

### Verification Process

<!--
What process did you follow to verify that your change has the desired effects?
- How did you verify that all new functionality works as expected?
- How did you verify that all changed functionality works as expected?
- How did you verify that the change has not introduced any regressions?
Describe the actions you performed (e.g., buttons you clicked, text you typed, commands you ran, etc.), and describe the results you observed.
-->

### Applicable Issues

<!-- Enter any applicable Issues here -->
65 changes: 55 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,61 @@
# fludo

A new Flutter project.
![banner](https://github.com/smokelaboratory/fludo/blob/master/banner.svg)

## Getting Started
# Fludo

This project is a starting point for a Flutter application.
[![License](https://img.shields.io/badge/License-Apache%202.0-2196F3.svg?style=for-the-badge)](https://opensource.org/licenses/Apache-2.0)
[![language](https://img.shields.io/github/languages/top/smokelaboratory/fludo.svg?style=for-the-badge&colorB=f18e33)](https://kotlinlang.org/)

A few resources to get you started if this is your first Flutter project:
Fludo is a Flutter app which uses canvas and animations to build a Ludo board game.

- [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab)
- [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook)
## Features

For help getting started with Flutter, view our
[online documentation](https://flutter.dev/docs), which offers tutorials,
samples, guidance on mobile development, and a full API reference.
* Roll dice & move your pawns
* Kill oponent's pawns
* Protect your pawns on safe spots
* Free turns as per basic ludo rules

## Gameplay

https://github.com/smokelaboratory/fludo/blob/master/gameplay.gif


## Roadmap

* Music integration
* UI/UX improvements
* Multiplayer support (Firebase)

### Pull Request
To generate a pull request, please consider following [Pull Request Template](https://github.com/smokelaboratory/fludo/blob/master/PULL_REQUEST_TEMPLATE.md).

### Issues
To submit an issue, please check the [Issue Template](https://github.com/smokelaboratory/fludo/blob/master/ISSUE_TEMPLATE.md).

Code of Conduct
---
[Code of Conduct](https://github.com/smokelaboratory/fludo/blob/master/CODE_OF_CONDUCT.md)

## Contribution

You are most welcome to contribute to this project!

Please have a look at [Contributing Guidelines](https://github.com/smokelaboratory/fludo/blob/master/CONTRIBUTING.md) before contributing and proposing a change.

# License

```
Copyright © 2020 smokelaboratory
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
```
89 changes: 89 additions & 0 deletions banner.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added gameplay.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 21 additions & 11 deletions lib/dice/dice_base.dart
Original file line number Diff line number Diff line change
@@ -1,25 +1,35 @@
import 'dart:math';

import 'package:flutter/material.dart';

class DiceBasePainter extends CustomPainter {
final double _radius;
double _startAngle;

DiceBasePainter(this._radius);
DiceBasePainter(this._startAngle);

@override
void paint(Canvas canvas, Size size) {
var center = Offset(size.width / 2, size.height / 2);
var radius = size.width;

canvas.drawCircle(
center,
_radius,
Paint()
..color = Colors.orange
..style = PaintingStyle.stroke
..strokeWidth = 10);
var center = Offset(size.width / 2, size.width / 2);

for (int arcIndex = 0; arcIndex < 12; arcIndex++) {
canvas.drawArc(
Rect.fromCircle(center: center, radius: radius),
_startAngle,
30 * pi / 180,
false,
Paint()
..color = arcIndex % 2 == 0 ? Colors.orange : Colors.white
..strokeWidth = 7
..style = PaintingStyle.stroke);

_startAngle += 30 * pi / 180;
}

canvas.drawCircle(
center,
_radius,
radius,
Paint()
..color = Colors.orangeAccent
..style = PaintingStyle.fill);
Expand Down

0 comments on commit 99f3e00

Please sign in to comment.