- Sounds (
correctDing.wav
,incorrectBuzz.wav
,scoreIncreaseCashierSound.wav
,trumpetSolSolDo2Yay.wav
): OK, I made them on MuseScore (exported to mp3), thus no copyright materials needed https://pixabay.com/sound-effects/search/whoosh/ - Select relaxing music while learning
[pull down: none, Green Hills, Derry Air, L'hiver] [Custom]
: OK, ditto
(Resources folders: app/src/main/res/raw | ios/Tempus E Spatium/Tempus E Spatium)
<!-- bgmusic_green_hills 青山 -->
<!-- bgmusic_derry_air 倫敦德里小調 -->
<!-- bgmusic_lhiver 冬 -->
TODOs:
- Support of other Wikimedia Projects + Quizlet
- Custom fine-grained syllabus (one set can include multiple WikiProjects; and you can remove articles from a WikiProject)
/* NewFineGrainedSetActivity.dart */
[Refresh all articles]
Set name: [_2020-01-01 00:02:04______] // ← cannot be empty !
// This is a `RecyclerView` of my `BeninView`
[__Autocomplete-dropdown_______________________________________________________]
[_R.id.squarePreview | Kalman filter__(R.id.smallDesc)_______] (-) // ← read-only text field, instead of label
[_R.id.squarePreview | Hungarian algorithm__(R.id.smallDesc)_] (-)
// If time is allowed, disable shuffle, drag to move article order.
[R.string.ok] [R.string.cancel]
/* BeninView.dart */
BeninView { // recycled by RecyclerView
mSquarePreview = findViewById(R.id.squarePreview);
Glide.with(this).load().into(mSquarePreview);
}
Saved to SQLite (FMDB ios/Tempus E Spatium/Tempus E Spatium/HighscoresDBManager.swift → sqflite):
let TABLE_SETS = "sets"
let TABLE_SET_ARTICLES = "setArticles"
let TABLE_CONNECTING_WALL = "connectingWall"
Table sets
:
setName | historicHigh | playedTimes | lastPlayedDate | creationDate | modifyDate |
---|---|---|---|---|---|
String(PK) | Int | Int | Timestamp | Timestamp | Timestamp |
Table setArticles
:
setName | article | lastRefreshedDate | creationDate | source |
---|---|---|---|---|
String(PK) | String(PK) | Timestamp | Timestamp | URL (for Revision) |
Table connectingWall
:
INSERT INTO connectingWall ('clue1', 'clue2', 'clue3', 'clue4', 'clue5', 'clue6', 'clue7', 'clue8', 'clue9', 'clue10', 'clue11', 'clue12', 'clue13', 'clue14', 'clue15', 'clue16', 'conn1', 'conn2', 'conn3', 'conn4') VALUES ('clue1', 'clue2', 'clue3', 'clue4', 'clue5', 'clue6', 'clue7', 'clue8', 'clue9', 'clue10', 'clue11', 'clue12', 'clue13', 'clue14', 'clue15', 'clue16', 'conn1', 'conn2', 'conn3', 'conn4')
- Themes:
- Relaxed Bears (bg: #C78311, #FEF0CB; txt: #FDD000, #F19EB4)
- Fire & Ice (#FD7A2D, #B1F3FC; bg/txt opposite)
- Zen (#282631 off-black, #FEF8DE off-white)
- Spring (#FF44BB, #FFB847)
- Summer (#46A266, #BADC66)
- Autumn (#FF4300, #FFB800)
- Winter (#0041DE, #00B9A2)
- Custom brackets (this requires replacing
<a>
with some<span class="">
and adding<style>
for the highlight effect, and a bottom popup)- Default: highlight all for you
[Reset to default]
- Highlight text you want to make brackets ->
[Make bracket|Cancel]
- Default: highlight all for you
- Switch to
view binding
- Add IPA game in custom mode -- similar vowels, diphthongs, consonants (e.g., sibilants) [Japanese would be easier to make though]
- 'Series' on WikiData? (under research;
GestureDetector.SimpleOnGestureListener
maybe? I can use free versions of Symphony/Piano Concerto No. X)
public class Fragment {
Block[] mViews = { findViewById(R.id.block1),
findViewById(R.id.block2),
findViewById(R.id.block3),
findViewById(R.id.block4),
findViewById(R.id.block5),
findViewById(R.id.block6),
findViewById(R.id.block7),
findViewById(R.id.block8),
findViewById(R.id.block9),
findViewById(R.id.block10),
findViewById(R.id.block11),
findViewById(R.id.block12),
findViewById(R.id.block13),
findViewById(R.id.block14),
findViewById(R.id.block15),
findViewById(R.id.block16) }; // fixed sized, use array instead of list
int[] mRandOrder = Collections.shuffle(Arrays.asList(Integer.Range(16))); // fixed sized, array 1 to 16
List<String> mSelectedBlks = new ArrayList<>();
// await
String[] mClues = database.rawQuery("SELECT * FROM connectingWall ORDER BY RANDOM() LIMIT 1;"); // get random row from
// DB
List<String> mLstGrp1 = Arrays.copyOfRange(mClues, 0, 4);
List<String> mLstGrp2 = Arrays.copyOfRange(mClues, 4, 8);
List<String> mLstGrp3 = Arrays.copyOfRange(mClues, 8, 12);
List<String> mLstGrp4 = Arrays.copyOfRange(mClues, 12, 16);
AudioPlayer mAudioPlayer = new AudioPlayer();
int mLives = 5, mGrpsDone = 0;
RecyclerView mHeartRecyclerView = this.findViewById(R.id.hearts);
Fragment mPlayer1View = this.findViewById(R.id.player1), mPlayer2View = this.findViewById(R.id.player2),
mView = this.findViewById(R.id.view);
// TODO: Animation -- z-rotate the wall 180 degrees
void newWall() {
mLives = 5;
mGrpsDone = 0;
for (int x = 0; x < 16; x++) {
mViews[mRandOrder[x]].setText(mClues[x]);
}
}
@onClick
void onClickListener(Block block) {
mSelectedBlks.append(block);
if (mSelectedBlks.length() == 4) {
// check if correct
boolean correct = false;
if (mLstGrp1.containsAll(mSelectedBlks) || mLstGrp2.containsAll(mSelectedBlks)
|| mLstGrp3.containsAll(mSelectedBlks) || mLstGrp4.containsAll(mSelectedBlks)) {
correct = true;
}
if (correct) {
// play shift animation
for (Block selected : mSelectedBlks) {
selected.clickable = false;
}
mGrpsDone += 1;
if (mGrpsDone == 4) {
mAudioPlayer.play(R.raw.shave_and_a_haircut_two_piece);
// winning condition
mPlayer1View.lock();
mPlayer2View.lock();
}
} else {
// incorrect
mLives -= 1;
mHeartRecyclerView.getElement(mLives).setDrawable(R.drawable.heart_empty); // starts from 0
if (mLives == 0) {
mView.clickable = false; // controller.mClickArea.isUserInteractionEnabled = false
}
}
}
// reset block colour
for (Block bk : mBlks) {
if (bk.clickable) {
bk.setColor(R.color.honeydew);
}
}
}
}
Bottom navy blue bar (Bold Dosis):
- State1: [TextEdit_____] [->]
- State2: [TickOrCross] Real Theme
Wall Solved Sound Effect: shavedAndAHaircutTwoPiece.mp3
(MuseScore)
- Five
heart_full.jpg
(Vs.heart_empty.jpg
) at the beginning (horizontalRecyclerView
, dock at top-right corner) - Three colours:
selected
(red),unselected
(maybe honeydew instead of soda blue?), andsolved
(maybe yellow?)- [all radial gradient]
- #1A7D6E (teal, solved)
- #032960 (navy, selected)
- #ACD7FB (sky, unselected)
- Style: Luminescent shading // Rounded corners // Dosis font
- Translation animation + Set colour (tween animation?) and texts on the fly
Question bank schema?//DB Browser for SQLite download(Done.)
Translations (add more locales!) + SQLite tables initial values + XPath
should compile to both OSes
compile_sqlite.py
import pandas as pd
# TODO
- Rebranding
- UI Overhaul
- Setting up for a more unified experience
- Algorithm Overhaul (add topic modelling)
Need a table for these XPaths. TODO.
lang | delimitedXpaths |
---|---|
String(PK) | [String, String, String...] |
compile_xpath.py
import pandas as pd
from selenium import webdriver
from selenium.webdriver.common.action_chains import ActionChains
from selenium.webdriver.common.keys import Keys
for s in delimitedXpath.split('|'):
err = driver.execute_script(s) # How deep?